* [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
@ 2014-08-25 8:04 ` Johannes Pointner
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Pointner @ 2014-08-25 8:04 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, 'Guenter Roeck', lm-sensors, linux-iio
This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.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 c749700..f084610 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",
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",
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [lm-sensors] [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
@ 2014-08-25 8:04 ` Johannes Pointner
0 siblings, 0 replies; 6+ messages in thread
From: Johannes Pointner @ 2014-08-25 8:04 UTC (permalink / raw)
To: Jonathan Cameron
Cc: linux-iio, 'Guenter Roeck', lm-sensors, linux-iio
This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.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 c749700..f084610 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",
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",
--
2.1.0
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
2014-08-25 8:04 ` [lm-sensors] " Johannes Pointner
@ 2014-08-25 11:01 ` Guenter Roeck
-1 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2014-08-25 11:01 UTC (permalink / raw)
To: Johannes Pointner, Jonathan Cameron; +Cc: linux-iio, lm-sensors
On 08/25/2014 01:04 AM, Johannes Pointner wrote:
> This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
>
> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lm-sensors] [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
@ 2014-08-25 11:01 ` Guenter Roeck
0 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2014-08-25 11:01 UTC (permalink / raw)
To: Johannes Pointner, Jonathan Cameron; +Cc: linux-iio, lm-sensors
On 08/25/2014 01:04 AM, Johannes Pointner wrote:
> This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
>
> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
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.
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
2014-08-25 11:01 ` [lm-sensors] " Guenter Roeck
@ 2014-08-25 15:57 ` Jonathan Cameron
-1 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2014-08-25 15:57 UTC (permalink / raw)
To: Guenter Roeck, Johannes Pointner; +Cc: linux-iio, lm-sensors
On 25/08/14 12:01, Guenter Roeck wrote:
> On 08/25/2014 01:04 AM, Johannes Pointner wrote:
>> This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
>>
>> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
>
> 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [lm-sensors] [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
@ 2014-08-25 15:57 ` Jonathan Cameron
0 siblings, 0 replies; 6+ messages in thread
From: Jonathan Cameron @ 2014-08-25 15:57 UTC (permalink / raw)
To: Guenter Roeck, Johannes Pointner; +Cc: linux-iio, lm-sensors
On 25/08/14 12:01, Guenter Roeck wrote:
> On 08/25/2014 01:04 AM, Johannes Pointner wrote:
>> This patch fixes the overwritten -EPROBE_DEFER return value in of_iio_channel_get_by_name.
>>
>> Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
>
> 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.
>
> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
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
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-25 15:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-25 8:04 [PATCH] iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name Johannes Pointner
2014-08-25 8:04 ` [lm-sensors] " Johannes Pointner
2014-08-25 11:01 ` Guenter Roeck
2014-08-25 11:01 ` [lm-sensors] " Guenter Roeck
2014-08-25 15:57 ` Jonathan Cameron
2014-08-25 15:57 ` [lm-sensors] " Jonathan Cameron
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.