Skip to content

Commit

Permalink
iio: imu: inv_mpu6050: Remove duplicate NULL check
Browse files Browse the repository at this point in the history
Since i2c_unregister_device() became NULL-aware we may remove duplicate
NULL check.

Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Hartmut Knaack <knaack.h@gmx.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Andy Shevchenko authored and Jonathan Cameron committed Dec 2, 2017
1 parent aa6b707 commit e36c8c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ void inv_mpu_acpi_delete_mux_client(struct i2c_client *client)
{
struct inv_mpu6050_state *st = iio_priv(dev_get_drvdata(&client->dev));

if (st->mux_client)
i2c_unregister_device(st->mux_client);
i2c_unregister_device(st->mux_client);
}
#else

Expand Down

0 comments on commit e36c8c1

Please sign in to comment.