mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-12-05 10:17:58 -05:00
iio:inkern: fix overwritten -EPROBE_DEFER in of_iio_channel_get_by_name
Fixes: a2c12493ed ('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 <[email protected]>
Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
Cc: [email protected]
This commit is contained in:
parent
eb29835fb3
commit
872687f626
1 changed files with 1 additions and 1 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue