char: hwicap: Remove unnecessary dev_set_drvdata()
authorMichal Simek <michal.simek@xilinx.com>
Mon, 30 Sep 2013 07:28:36 +0000 (09:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Oct 2013 23:03:31 +0000 (16:03 -0700)
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 <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/xilinx_hwicap/xilinx_hwicap.c

index a7f65c2b2cb5df7c26f966281147382626d85881..f6345f932e46c8e841ae2f7e9777da0ed9a905f3 100644 (file)
@@ -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;