Skip to content

Commit 87f0a42

Browse files
Jingoo Hangregkh
authored andcommitted
misc: arm-charlcd: remove unnecessary platform_set_drvdata()
The driver core clears the driver data to NULL after device_release or on probe failure, since commit 0998d06 (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 <jg1.han@samsung.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 21b066f commit 87f0a42

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎drivers/misc/arm-charlcd.c‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ static int __init charlcd_probe(struct platform_device *pdev)
291291
lcd->virtbase = ioremap(lcd->phybase, lcd->physize);
292292
if (!lcd->virtbase) {
293293
ret = -ENOMEM;
294-
goto out_no_remap;
294+
goto out_no_memregion;
295295
}
296296

297297
lcd->irq = platform_get_irq(pdev, 0);
@@ -320,8 +320,6 @@ static int __init charlcd_probe(struct platform_device *pdev)
320320

321321
out_no_irq:
322322
iounmap(lcd->virtbase);
323-
out_no_remap:
324-
platform_set_drvdata(pdev, NULL);
325323
out_no_memregion:
326324
release_mem_region(lcd->phybase, SZ_4K);
327325
out_no_resource:
@@ -337,7 +335,6 @@ static int __exit charlcd_remove(struct platform_device *pdev)
337335
free_irq(lcd->irq, lcd);
338336
iounmap(lcd->virtbase);
339337
release_mem_region(lcd->phybase, lcd->physize);
340-
platform_set_drvdata(pdev, NULL);
341338
kfree(lcd);
342339
}
343340

0 commit comments

Comments
 (0)