iio: imu: inv_mpu6050: Remove duplicate NULL check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 31 Oct 2017 14:21:47 +0000 (16:21 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 2 Dec 2017 10:40:11 +0000 (10:40 +0000)
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>
drivers/iio/imu/inv_mpu6050/inv_mpu_acpi.c

index dd6fc6d21f9d0c6057b6b5029800eef2fa82dacb..d78a10403bace100457193c64df2aa39a05b5fb0 100644 (file)
@@ -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