Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: mb1232: relax return value check for IRQ get

fwnode_irq_get() was changed to not return 0 anymore.

Drop check for return value 0.

Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/9e18cf49a8bb581a84c3fa548ea577e2a3eb840d.1690890774.git.mazziesaccount@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Matti Vaittinen and committed by
Jonathan Cameron
1402913c c09ddcdd

+2 -5
+2 -5
drivers/iio/proximity/mb1232.c
··· 76 76 goto error_unlock; 77 77 } 78 78 79 - if (data->irqnr >= 0) { 79 + if (data->irqnr > 0) { 80 80 /* it cannot take more than 100 ms */ 81 81 ret = wait_for_completion_killable_timeout(&data->ranging, 82 82 HZ/10); ··· 212 212 init_completion(&data->ranging); 213 213 214 214 data->irqnr = fwnode_irq_get(dev_fwnode(&client->dev), 0); 215 - if (data->irqnr <= 0) { 216 - /* usage of interrupt is optional */ 217 - data->irqnr = -1; 218 - } else { 215 + if (data->irqnr > 0) { 219 216 ret = devm_request_irq(dev, data->irqnr, mb1232_handle_irq, 220 217 IRQF_TRIGGER_FALLING, id->name, indio_dev); 221 218 if (ret < 0) {