]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
staging: iio/ad7291: fix error code in ad7291_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Jun 2014 19:22:00 +0000 (20:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 18:21:30 +0000 (11:21 -0700)
commit602ec4489ce9fd7f27bedacd5bdda44a4206a541
tree2600cfe26ac7a7afe483b490c79548c8196d7308
parentbadceea9879bdd4e1eadab1498e91bf2c394658a
staging: iio/ad7291: fix error code in ad7291_probe()

commit b70e19c222a64018d308ebc80333575aff9f4e51 upstream.

We should be returning a negative error code instead of success here.

This would have been detected by GCC, except that the "ret" variable was
initialized with a bogus value to disable GCC's uninitialized variable
warnings.  I've cleaned that up, as well.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/adc/ad7291.c