Skip to content

Commit

Permalink
char: hwicap: Remove unnecessary dev_set_drvdata()
Browse files Browse the repository at this point in the history
Driver core clears the driver data to NULL after device_release
or on probe failure, so just remove it from here.

Signed-off-by: Michal Simek <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Michal Simek authored and gregkh committed Oct 3, 2013
1 parent bc34268 commit 12b3af3
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/char/xilinx_hwicap/xilinx_hwicap.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,7 +731,6 @@ static int hwicap_remove(struct device *dev)
iounmap(drvdata->base_address);
release_mem_region(drvdata->mem_start, drvdata->mem_size);
kfree(drvdata);
dev_set_drvdata(dev, NULL);

mutex_lock(&icap_sem);
probed_devices[MINOR(dev->devt)-XHWICAP_MINOR] = 0;
Expand Down

0 comments on commit 12b3af3

Please sign in to comment.