From 8247bcb998f2824f89da2eb5ec21f3e7d4fa66a5 Mon Sep 17 00:00:00 2001 From: Amitoj Kaur Chawla Date: Thu, 25 Feb 2016 11:07:59 +0530 Subject: [PATCH] staging: unisys: visorbus: Remove unnecessary dev_set_drvdata() Unnecessary dev_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 device *dev; @@ - dev_set_drvdata(dev, NULL); // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman --- drivers/staging/unisys/visorbus/visorbus_main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 4f7d74326e59..9e048e9a40f0 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -221,7 +221,6 @@ visorbus_release_busdevice(struct device *xdev) { struct visor_device *dev = dev_get_drvdata(xdev); - dev_set_drvdata(xdev, NULL); kfree(dev); } -- 2.20.1