iio: imu: kmx61: Enhance error handling
authorDaniel Baluta <daniel.baluta@intel.com>
Tue, 23 Dec 2014 13:22:26 +0000 (15:22 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 5 Jan 2015 18:59:52 +0000 (18:59 +0000)
commit28ff344e1d0a08d60149b859d47e1610fa5b622b
tree603ebf71ae9b3f13b96ea7ab00cdf5f039fd6a34
parenta3da4fa301ae60aac688ca320fb8b46a053d6d25
iio: imu: kmx61: Enhance error handling

This fixes parts of kmx61 error handling to make code easier to read and to be
more consistent with IIO coding conventions:
* prefer as single point for error handling instead of duplicating code
for each function
* directly return a value from a case branch instead of breaking
* fix error message for writing REG_CTRL1

Also, add separate error paths for kmx61_trigger_setup/iio_triggered_buffer_setup
calls.

Signed-off-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/imu/kmx61.c
This page took 0.026052 seconds and 5 git commands to generate.