Skip to content

Commit

Permalink
drivers/block/swim.c: remove unnecessary platform_set_drvdata()
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Jingoo Han <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Jingoo Han authored and torvalds committed Sep 11, 2013
1 parent e7b18ed commit c07303c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/block/swim.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ static int swim_probe(struct platform_device *dev)
return 0;

out_kfree:
platform_set_drvdata(dev, NULL);
kfree(swd);
out_iounmap:
iounmap(swim_base);
Expand Down Expand Up @@ -962,7 +961,6 @@ static int swim_remove(struct platform_device *dev)
if (res)
release_mem_region(res->start, resource_size(res));

platform_set_drvdata(dev, NULL);
kfree(swd);

return 0;
Expand Down

0 comments on commit c07303c

Please sign in to comment.