]> git.baikalelectronics.ru Git - kernel.git/commit
iio: of_iio_channel_get_by_name() returns non-null pointers for error legs
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Thu, 6 Nov 2014 12:11:00 +0000 (12:11 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 21 Jun 2014 11:31:38 +0000 (12:31 +0100)
commit5c971bd9e3d492b07bddaf862515323542a88e04
treeaf4d43b6129b5184fe2bf620cdfd4a52e960ab4b
parente113196fb9bba001ba4c017115832f40a18af772
iio: of_iio_channel_get_by_name() returns non-null pointers for error legs

Currently in the inkern.c code for IIO framework, the function
of_iio_channel_get_by_name() will return a non-NULL pointer when
it cannot find a channel using of_iio_channel_get() and when it
tries to search for 'io-channel-ranges' property and fails. This
is incorrect behaviour as the function which calls this expects
a NULL pointer for failure. This patch rectifies the issue.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Stable@vger.kernel.org
drivers/iio/inkern.c