Skip to content

Commit

Permalink
drivers/rtc/rtc-mrst.c: remove redundant dev_set_drvdata
Browse files Browse the repository at this point in the history
Driver core sets the driver data to NULL upon device_release or on probe
failure.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Sachin Kamat authored and Linus Torvalds committed Nov 13, 2013
1 parent d7d954a commit 8e3dd0d
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/rtc/rtc-mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ static int vrtc_mrst_do_probe(struct device *dev, struct resource *iomem,
cleanup1:
rtc_device_unregister(mrst_rtc.rtc);
cleanup0:
dev_set_drvdata(dev, NULL);
mrst_rtc.dev = NULL;
release_mem_region(iomem->start, resource_size(iomem));
dev_err(dev, "rtc-mrst: unable to initialise\n");
Expand Down Expand Up @@ -412,7 +411,6 @@ static void rtc_mrst_do_remove(struct device *dev)
mrst->iomem = NULL;

mrst->dev = NULL;
dev_set_drvdata(dev, NULL);
}

#ifdef CONFIG_PM
Expand Down

0 comments on commit 8e3dd0d

Please sign in to comment.