[3.13.y.z extended stable] Patch "iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Thu Oct 9 20:51:26 UTC 2014

This is a note to let you know that I have just added a patch titled

    iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name

to the linux-3.13.y-queue branch of the 3.13.y.z extended stable tree 
which can be found at:


This patch is scheduled to be released in version

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y.z tree, see



>From a12e74918f61781b5079bcea514a90a6fe800038 Mon Sep 17 00:00:00 2001
From: Johannes Pointner <johannes.pointner at gmail.com>
Date: Mon, 25 Aug 2014 09:04:00 +0100
Subject: iio:inkern: fix overwritten -EPROBE_DEFER in

commit 872687f626e033b4ddfaec1e410057cfc6636d77 upstream.

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.

Signed-off-by: Johannes Pointner <johannes.pointner at br-automation.com>
Reviewed-by: Guenter Roeck <linux at roeck-us.net>
Signed-off-by: Jonathan Cameron <jic23 at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
 drivers/iio/inkern.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/inkern.c b/drivers/iio/inkern.c
index 1e8e94d..4fc88e6 100644
--- a/drivers/iio/inkern.c
+++ b/drivers/iio/inkern.c
@@ -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",
 		chan = of_iio_channel_get(np, index);
-		if (!IS_ERR(chan))
+		if (!IS_ERR(chan) || PTR_ERR(chan) == -EPROBE_DEFER)
 		else if (name && index >= 0) {
 			pr_err("ERROR: could not get IIO channel %s:%s(%i)\n",

More information about the kernel-team mailing list