From: Akinobu Mita Date: Mon, 9 Oct 2006 09:04:30 +0000 (+0900) Subject: driver core: kmalloc() failure check in driver_probe_device X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4d664238207a82c4018757e2d87cf2a780462dcd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git driver core: kmalloc() failure check in driver_probe_device driver_probe_device() is missing kmalloc() failure check. Signed-off-by: Akinobu Mita Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/dd.c b/drivers/base/dd.c index ef7db6939cbf..db01b95a47a5 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -171,6 +171,8 @@ int driver_probe_device(struct device_driver * drv, struct device * dev) drv->bus->name, dev->bus_id, drv->name); data = kmalloc(sizeof(*data), GFP_KERNEL); + if (!data) + return -ENOMEM; data->drv = drv; data->dev = dev;