aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-11-28 13:45:21 +0200
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2018-12-03 21:40:01 +0200
commit6734489667e240b14170a70dc7e72d333e93d5ad (patch)
tree62854a80843c5a42f8f5f2b6d9f3494c75267b63 /drivers/platform/x86
parentplatform/x86: dell-laptop: Mark expected switch fall-throughs (diff)
downloadlinux-dev-6734489667e240b14170a70dc7e72d333e93d5ad.tar.xz
linux-dev-6734489667e240b14170a70dc7e72d333e93d5ad.zip
platform/x86: intel_cht_int33fe: Remove duplicate NULL check
Since i2c_unregister_device() became NULL-aware we may remove duplicate NULL check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/intel_cht_int33fe.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c
index 464fe93657b5..431151d4e611 100644
--- a/drivers/platform/x86/intel_cht_int33fe.c
+++ b/drivers/platform/x86/intel_cht_int33fe.c
@@ -213,8 +213,7 @@ out_unregister_fusb302:
i2c_unregister_device(data->fusb302);
out_unregister_max17047:
- if (data->max17047)
- i2c_unregister_device(data->max17047);
+ i2c_unregister_device(data->max17047);
device_connections_remove(data->connections);
@@ -227,8 +226,7 @@ static int cht_int33fe_remove(struct platform_device *pdev)
i2c_unregister_device(data->pi3usb30532);
i2c_unregister_device(data->fusb302);
- if (data->max17047)
- i2c_unregister_device(data->max17047);
+ i2c_unregister_device(data->max17047);
device_connections_remove(data->connections);