driver core: kmalloc() failure check
PATCH 1/1 driver core: kmalloc() failure check
driver_probe_device() is missing kmalloc() failure check.
Cc Greg Kroah-Hartman <[email protected]>
Signed-off-by Akinobu Mita <[email protected]>
drivers/base/dd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/base/dd.c +2 -0
@@ -171,6 +171,8 @@ int driver_probe_device(struct device_dr drv->bus->name, dev->bus_id, drv->name); data =kmalloc (sizeof (*data),GFP_KERNEL ); +if (!data) +return -ENOMEM ; data->drv = drv; data->dev = dev;