From: Daniel Baluta Date: Tue, 23 Dec 2014 13:22:26 +0000 (+0200) Subject: iio: imu: kmx61: Enhance error handling X-Git-Tag: fixes-v4.0-rc1~99^2~245^2~13 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28ff344e1d0a08d60149b859d47e1610fa5b622b;p=pandora-kernel.git 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 Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed