提交 4d664238 编写于 作者: A Akinobu Mita 提交者: Greg Kroah-Hartman

driver core: kmalloc() failure check in driver_probe_device

driver_probe_device() is missing kmalloc() failure check.
Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 d9fd4d3b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册