提交 090da752 编写于 作者: W Wang YanQing 提交者: Tomi Valkeinen

video:uvesafb: Fix dereference NULL pointer code path

platform_device_alloc could failed and return NULL,
we should check this before call platform_device_put.
Signed-off-by: NWang YanQing <udknight@gmail.com>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 477fc03f
......@@ -1973,7 +1973,8 @@ static int uvesafb_init(void)
err = -ENOMEM;
if (err) {
platform_device_put(uvesafb_device);
if (uvesafb_device)
platform_device_put(uvesafb_device);
platform_driver_unregister(&uvesafb_driver);
cn_del_callback(&uvesafb_cn_id);
return err;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册