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

Configure Feed

Select the types of activity you want to include in your feed.

pinctrl: cy8c95x0: Avoid returning positive values to user space

When probe fails due to unclear interrupt status register, it returns
a positive number instead of the proper error code. Fix this accordingly.

Fixes: e6cbbe42944d ("pinctrl: Add Cypress cy8c95x0 support")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202602271847.vVWkqLBD-lkp@intel.com/
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>

authored by

Andy Shevchenko and committed by
Linus Walleij
5ad32c36 9f6cfc93

+1 -1
+1 -1
drivers/pinctrl/pinctrl-cy8c95x0.c
··· 1300 1300 /* Read IRQ status register to clear all pending interrupts */ 1301 1301 ret = cy8c95x0_irq_pending(chip, pending_irqs); 1302 1302 if (ret) 1303 - return dev_err_probe(dev, ret, "failed to clear irq status register\n"); 1303 + return dev_err_probe(dev, -EBUSY, "failed to clear irq status register\n"); 1304 1304 1305 1305 /* Mask all interrupts */ 1306 1306 bitmap_fill(chip->irq_mask, MAX_LINE);