staging:iio:magnetometer:ak8975: Fix probe() error-handling
commitad31d250bf60c8e4c990e8b0daeedbaa2d6884a9
authorStephen Warren <swarren@nvidia.com>
Wed, 21 Sep 2011 10:16:01 +0000 (21 11:16 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 27 Sep 2011 00:31:55 +0000 (26 17:31 -0700)
tree31f612b6afe35a33ab5e40e01ba699126ec2ffaf
parent7c6c936832a46e86b0fac654923ce5015bdc80ee
staging:iio:magnetometer:ak8975: Fix probe() error-handling

Fix ak8975_probe() to jump to the appropriate exit labels when an error
occurs. With the previous code, some cleanup actions were being skipped
for some error conditions.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/magnetometer/ak8975.c