]> git.baikalelectronics.ru Git - kernel.git/commit
inkern: iio_device_put after incorrect return/goto
authorJoe Perches <joe@perches.com>
Tue, 4 Jun 2013 14:44:00 +0000 (15:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Tue, 4 Jun 2013 17:28:21 +0000 (18:28 +0100)
commitab87644a0d95fdc57f0906aa1dc089c7b9cfe0ff
tree33989028ad270fed5a1b6d3e4e2c864d77bac21a
parentff65cb9f9cd5492717e24799ad8aa7ee0f46f729
inkern: iio_device_put after incorrect return/goto

The code uses

    return foo;
    goto err_type;

when instead the form should have been

    ret = foo;
    goto err_type;

Here this causes a useful iio_device_put to be skipped.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/inkern.c