iio: accel: mma9551: Check gpiod_to_irq return value
authorRoberta Dobrescu <roberta.dobrescu@gmail.com>
Mon, 2 Mar 2015 10:39:12 +0000 (12:39 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 9 Mar 2015 13:27:49 +0000 (13:27 +0000)
commitdebf6d843eaa3622786c45eb6edbc46f38f31a90
tree84d28209b44f288fb59e193e5e00f7ff0eb41db2
parent4a428bf3d92385f27cbb15bef90754027ba4f2d9
iio: accel: mma9551: Check gpiod_to_irq return value

The return value of gpiod_to_irq should be checked before giving
it to devm_request_threaded_irq in order to not pass an error
code in case it fails.

Signed-off-by: Roberta Dobrescu <roberta.dobrescu@gmail.com>
Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/mma9551.c