From: Adam Thomson Date: Thu, 6 Nov 2014 12:11:00 +0000 (+0000) Subject: iio: of_iio_channel_get_by_name() returns non-null pointers for error legs X-Git-Tag: omap-for-v3.16/fixes-rc4~21^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a2c12493ed7e63a18cef33a71686d12ffcd6600e;p=pandora-kernel.git 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 Signed-off-by: Jonathan Cameron Cc: Stable@vger.kernel.org --- Reading git-diff-tree failed