VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Sergey Shtylyov <s.shtylyov@omprussia.ru> 2021-04-10 23:20:49 +0300 committer: Wolfram Sang <wsa@kernel.org> 2021-04-14 10:20:45 +0200 commit: 0d3bf53e897dce943b98d975bbde77156af6cd81 parent: c5e5f7a8d931fb4beba245bdbc94734175fda9de
Commit Summary:
i2c: mlxbf: add IRQ check
Diffstat:
1 file changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 80ab831df349..8716032f030a 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2370,6 +2370,8 @@ static int mlxbf_i2c_probe(struct platform_device *pdev)
 	mlxbf_i2c_init_slave(pdev, priv);
 
 	irq = platform_get_irq(pdev, 0);
+	if (irq < 0)
+		return irq;
 	ret = devm_request_irq(dev, irq, mlxbf_smbus_irq,
 			       IRQF_ONESHOT | IRQF_SHARED | IRQF_PROBE_SHARED,
 			       dev_name(dev), priv);