iio: ak8975: minor fixes
authorGwendal Grignou <gwendal@chromium.org>
Fri, 21 Nov 2014 18:45:47 +0000 (10:45 -0800)
committerJonathan Cameron <jic23@kernel.org>
Sat, 22 Nov 2014 11:28:04 +0000 (11:28 +0000)
commit71222bf5412c78d96bf73d09475d3077ce0789f8
tree6f9cec236e6ffc4b38f889cac81dfd36366d11a2
parent56ae98a20591fcb45c6161fc80cf213e47b8ac04
iio: ak8975: minor fixes

Fixes code duplication, return of function.
Check client->irq properly when setting up optional irq handler.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Hartmut Knaack <knaack.h@gmx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/magnetometer/ak8975.c