clocksource: sh_tmu: remove unnecessary platform_set_drvdata()
PATCH 1/2 clocksource: sh_tmu: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.
--- drivers/clocksource/sh_tmu.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/sh_tmu.c +0 -1
@@ -509,7 +509,6 @@ static int sh_tmu_probe(struct platform_device *pdev) ret =sh_tmu_setup (p, pdev);if (ret) {kfree (p); -platform_set_drvdata (pdev,NULL );pm_runtime_idle (&pdev->dev);return ret; }
Signature · 1 line
1.7.10.4
PATCH 2/2 clocksource: sh_mtu2: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.
--- drivers/clocksource/sh_mtu2.c | 1 - 1 file changed, 1 deletion(-)
drivers/clocksource/sh_mtu2.c +0 -1
@@ -346,7 +346,6 @@ static int sh_mtu2_probe(struct platform_device *pdev) ret =sh_mtu2_setup (p, pdev);if (ret) {kfree (p); -platform_set_drvdata (pdev,NULL );pm_runtime_idle (&pdev->dev);return ret; }
Signature · 1 line
1.7.10.4
Quoted 5 lines · Jingoo Han
The driver core clears the driver data to NULL after
device_releaseor on probe failure. Thus, it is not needed to manually clear the device driver data to NULL.Signed-off-by Jingoo Han <[email protected]>
No objections for this and the following patch:
Daniel, let me know if you would prefer if I queued these up and sent you a pull request or you would rather just pick them up directly.
Quoted 20 lines
--- drivers/clocksource/sh_tmu.c | 1 - 1 file changed, 1 deletion(-)drivers/clocksource/sh_tmu.c +0
-1@@ -509,7 +509,6 @@ static int sh_tmu_probe(struct platform_device *pdev) ret =sh_tmu_setup (p, pdev);if (ret) {kfree (p); -platform_set_drvdata (pdev,NULL );pm_runtime_idle (&pdev->dev);return ret; }Signature · 1 line
1.7.10.4