Input: cobalt_btns - remove redundant dev_set_drvdata
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 18 Sep 2013 14:45:27 +0000 (07:45 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 18 Sep 2013 14:53:12 +0000 (07:53 -0700)
Driver core sets the data to NULL upon release or probe
failure. Hence explicit setting is not necessary.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/misc/cobalt_btns.c

index 4f77f87847e805ef33abf52f72f21a2dd92b2c81..b5d71d245854684a33d8baeead24b78148a087c7 100644 (file)
@@ -131,7 +131,6 @@ static int cobalt_buttons_probe(struct platform_device *pdev)
  err_free_mem:
        input_free_polled_device(poll_dev);
        kfree(bdev);
-       dev_set_drvdata(&pdev->dev, NULL);
        return error;
 }
 
@@ -144,7 +143,6 @@ static int cobalt_buttons_remove(struct platform_device *pdev)
        input_free_polled_device(bdev->poll_dev);
        iounmap(bdev->reg);
        kfree(bdev);
-       dev_set_drvdata(dev, NULL);
 
        return 0;
 }