hwmon: (w83627ehf) remove unnecessary platform_set_drvdata()
PATCH 5/5 hwmon: (w83627ehf) remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d0631001288a5974afc0b2a5f568bcdecb4d (device-core: Ensure drvdata = NULL when no driver is bound). Thus, it is not needed to manually clear the device driver data to NULL.
Signed-off-by Jingoo Han <[email protected]>
--- drivers/hwmon/w83627ehf.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/hwmon/w83627ehf.c +0 -2
@@ -2598,7 +2598,6 @@ static int w83627ehf_probe(struct platform_device *pdev) exit_remove:w83627ehf_device_remove_files (dev); exit_release: -platform_set_drvdata (pdev,NULL );release_region (res->start,IOREGION_LENGTH ); exit:return err;
@@ -2611,7 +2610,6 @@ static int w83627ehf_remove(struct platform_device *pdev)hwmon_device_unregister (data->hwmon_dev);w83627ehf_device_remove_files (&pdev->dev);release_region (data->addr,IOREGION_LENGTH ); -platform_set_drvdata (pdev,NULL );return 0 ; }
Signature · 8 lines
1.7.2.5 _______________________________________________ lm-sensors mailing list [email protected] http://lists.lm-sensors.org/mailman/listinfo/lm-sensors