aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Ribalda <[email protected]>2024-04-10 21:54:42 +0000
committerHans Verkuil <[email protected]>2024-04-15 13:42:39 +0200
commitf1411be0462c8e8826fe2cb5908bd169b9eac597 (patch)
treef3674693736d89c0c03de2d58f24eccf74cc02f8
parentcb385548ec17797fb0d356d83dc5d9035de6eec4 (diff)
media: adv7180: Only request valids IRQs
i2c_device_probe(), seems to assume that irq = 0 means that there is no irq to request. The driver also believes that on the clean path. So lets be consistent here. Also make smatch happy. Fix: drivers/media/i2c/adv7180.c:1526 adv7180_probe() warn: 'client->irq' from request_threaded_irq() not released on lines: 1526 Signed-off-by: Ricardo Ribalda <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
-rw-r--r--drivers/media/i2c/adv7180.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index 4829cbe32419..819ff9f7c90f 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1486,7 +1486,7 @@ static int adv7180_probe(struct i2c_client *client)
if (ret)
goto err_media_entity_cleanup;
- if (state->irq) {
+ if (state->irq > 0) {
ret = request_threaded_irq(client->irq, NULL, adv7180_irq,
IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
KBUILD_MODNAME, state);