iio: accel: kxcjk-1013: power off device if probe fails
authorIrina Tirdea <irina.tirdea@intel.com>
Wed, 10 Dec 2014 16:23:54 +0000 (18:23 +0200)
committerJonathan Cameron <jic23@kernel.org>
Fri, 12 Dec 2014 12:28:35 +0000 (12:28 +0000)
commit9d02daf738bf01b9d89d4de2b74ed3bc9bebbb40
tree20ddb717eb9109d5fb475d846b098f9c06f97a45
parentfbd123e913ed25ec861ce3be10725b5beb27ab48
iio: accel: kxcjk-1013: power off device if probe fails

When the device is initialized in probe, it is also powered on.
If there is an error after the initialization, the device will
remain powered on.

Power off the device in case probe fails after device initialization.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Suggested-by: Daniel Baluta <daniel.baluta@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/accel/kxcjk-1013.c