Skip to contentSkip to conversation

iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name

PATCH Applied Johannes Pointner 3 participants 3 messages Aug 25, 2014 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name

This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.

---
 drivers/iio/inkern.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/inkern.c +1 -1
index c749700..f084610 100644
@@ -178,7 +178,7 @@ static struct iio_channel *of_iio_channel_get_by_name(struct device_node *np,
 			index = of_property_match_string(np, "io-channel-names",
 							 name);
 		chan = of_iio_channel_get(np, index);
-		if (!IS_ERR(chan))
+		if (!IS_ERR(chan) || PTR_ERR(chan) = -EPROBE_DEFER)
 			break;
 		else if (name && index >= 0) {
 			pr_err("ERROR: could not get IIO channel %s:%s(%i)\n",
Signature · 6 lines
2.1.0

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
Reviewed-by on v1 1/1
#1 lore raw
Quoted 3 lines · Johannes Pointner

This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.

Fixes a2c12493ed7e ('iio: of_iio_channel_get_by_name() returns non-null pointers for error legs')

which improperly assumes that of_iio_channel_get_by_name must always return NULL and thus now hides -EPROBE_DEFER.

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

maintainer Applied
#2 lore raw
Quoted 11 lines · Guenter Roeck
Quoted 3 lines · Johannes Pointner

This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.

Fixes a2c12493ed7e ('iio: of_iio_channel_get_by_name() returns non-null pointers for error legs')

which improperly assumes that of_iio_channel_get_by_name must always return NULL and thus now hides -EPROBE_DEFER.

Applied to the fixes-togreg branch of iio.git with Guenter's more specific patch description. Also marked for stable.

Thanks to both of you for this fix!

J

Quoted 5 lines
Signature · 4 lines
-- 
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors