Skip to contentSkip to conversation

patch "iio: light: cm3605: Fix an error handling path in cm3605_probe()" added to char-misc-linus

PATCH [email protected] 1 participant 1 message Aug 23, 2022

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

iio: light: cm3605: Fix an error handling path in cm3605_probe()

to my char-misc git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git
in the char-misc-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

From 160905549e663019e26395ed9d66c24ee2cf5187 Mon Sep 17 00:00:00 2001
From: Christophe JAILLET <[email protected]>
Date: Sun, 7 Aug 2022 08:37:43 +0200
Subject: iio: light: cm3605: Fix an error handling path in cm3605_probe()

The commit in Fixes also introduced a new error handling path which should goto the existing error handling path.
Otherwise some resources leak.

---
 drivers/iio/light/cm3605.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/iio/light/cm3605.c +4 -2
index c721b69d5095..0b30db77f78b 100644
@@ -226,8 +226,10 @@ static int cm3605_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0)
-		return dev_err_probe(dev, irq, "failed to get irq\n");
+	if (irq < 0) {
+		ret = dev_err_probe(dev, irq, "failed to get irq\n");
+		goto out_disable_aset;
+	}
 
 	ret = devm_request_threaded_irq(dev, irq, cm3605_prox_irq,
 					NULL, 0, "cm3605", indio_dev);
Signature · 1 line
2.37.2