platform/x86: intel_cht_int33fe: Remove duplicate NULL check
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 28 Nov 2018 11:45:21 +0000 (13:45 +0200)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 3 Dec 2018 19:40:01 +0000 (21:40 +0200)
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>
drivers/platform/x86/intel_cht_int33fe.c

index 464fe93657b53e03268eabb2f41f5cdd0583d96e..431151d4e611a4257a1e1904a008c38d3c1a49f1 100644 (file)
@@ -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);