From: Andy Shevchenko Date: Wed, 28 Nov 2018 11:45:21 +0000 (+0200) Subject: platform/x86: intel_cht_int33fe: Remove duplicate NULL check X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6734489667e240b14170a70dc7e72d333e93d5ad;p=linux.git 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 Reviewed-by: Heikki Krogerus Reviewed-by: Hans de Goede --- diff --git a/drivers/platform/x86/intel_cht_int33fe.c b/drivers/platform/x86/intel_cht_int33fe.c index 464fe93657b53..431151d4e611a 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);