]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: media: omap4iss: Remove unnecessary platform_set_drvdata()
authorAmitoj Kaur Chawla <amitoj1606@gmail.com>
Thu, 25 Feb 2016 05:37:47 +0000 (11:07 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 12 Mar 2016 06:09:09 +0000 (22:09 -0800)
Unnecessary platform_set_drvdata() has been removed since the driver
core clears the driver data to NULL after device release or on
probe failure. There is no need to manually clear the device
driver data to NULL.

The Coccinelle semantic patch used to make this change is as follows:
//<smpl>
@@
struct platform_device *pdev;
@@
- platform_set_drvdata(pdev, NULL);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/omap4iss/iss.c

index 30b473cfb02013b2321904337b919548cb791e4b..dea67d96d704449a62d7bda55a88e11f7e414a4b 100644 (file)
@@ -1527,8 +1527,6 @@ error_modules:
 error_iss:
        omap4iss_put(iss);
 error:
-       platform_set_drvdata(pdev, NULL);
-
        mutex_destroy(&iss->iss_mutex);
 
        return ret;