OSDN Git Service

iio: sensors-core: st: Check st_sensors_set_drdy_int_pin()'s return value
authorLee Jones <lee.jones@linaro.org>
Wed, 13 Aug 2014 10:27:34 +0000 (11:27 +0100)
committerLee Jones <lee.jones@linaro.org>
Fri, 26 Sep 2014 07:15:27 +0000 (08:15 +0100)
commit374de1642ee4322cc4d6aa1d2679378b8547c368
treeca61cf9f4f36660b079adf7713037f0c80dc38d1
parent0608bab8c7ceabd363901376d3693e8f45371768
iio: sensors-core: st: Check st_sensors_set_drdy_int_pin()'s return value

Value from st_sensors_set_drdy_int_pin() is assigned to err here,
but that stored value is not used before it is overwritten.  To fix
this we're enforcing a check on st_sensors_set_drdy_int_pin()'s
return value and if it's an error, we're returning right away.

Cc: jic23@kernel.org
Cc: linux-iio@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/iio/common/st_sensors/st_sensors_core.c