From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 05:37:47 +0000 (+0530) Subject: staging: media: omap4iss: Remove unnecessary platform_set_drvdata() X-Git-Tag: v4.6~331^2~168 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3b7a3dac9204d1f1b5e7c314dbacb372a93b7c99;p=platform%2Fkernel%2Flinux-amlogic.git staging: media: omap4iss: Remove unnecessary platform_set_drvdata() 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: // @@ struct platform_device *pdev; @@ - platform_set_drvdata(pdev, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 30b473c..dea67d9 100644 --- a/drivers/staging/media/omap4iss/iss.c +++ b/drivers/staging/media/omap4iss/iss.c @@ -1527,8 +1527,6 @@ error_modules: error_iss: omap4iss_put(iss); error: - platform_set_drvdata(pdev, NULL); - mutex_destroy(&iss->iss_mutex); return ret;