diff --git a/drivers/base/dd.c b/drivers/base/dd.c index d21f4b8dc37b9f0f8128cb9d3524b8cdd6973ea8..ba03353ff2437d8edb395454c19402642fd9b6ec 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);