From 3b7a3dac9204d1f1b5e7c314dbacb372a93b7c99 Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 11:07:47 +0530 Subject: [PATCH] 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 --- drivers/staging/media/omap4iss/iss.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/media/omap4iss/iss.c b/drivers/staging/media/omap4iss/iss.c index 30b473cfb020..dea67d96d704 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; -- 2.39.5