iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
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
@@ -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
Quoted 3 lines · Johannes Pointner
This patch fixes the overwritten -EPROBE_DEFER return value in
of_iio_channel_get_by_name.Signed-off-by Johannes Pointner <[email protected]>
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
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.Signed-off-by Johannes Pointner <[email protected]>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_namemust always return NULL and thus now hides -EPROBE_DEFER.Reviewed-by Guenter Roeck <[email protected]>
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