summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/base/dd.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index d21f4b8dc37b..ba03353ff243 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -594,9 +594,7 @@ void driver_detach(struct device_driver *drv)
*/
void *dev_get_drvdata(const struct device *dev)
{
- if (dev)
- return dev->driver_data;
- return NULL;
+ return dev->driver_data;
}
EXPORT_SYMBOL(dev_get_drvdata);