mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
driver core: kmalloc() failure check in driver_probe_device
driver_probe_device() is missing kmalloc() failure check. Signed-off-by: Akinobu Mita <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
d9fd4d3b31
commit
4d66423820
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue