提交 c9d1a0b8 编写于 作者: A Adrian Bunk 提交者: Wim Van Sebroeck

[WATCHDOG] pcwd_usb.c: fix a NULL pointer dereference

The Coverity checker noted that this resulted in a NULL pointer
reference if we were coming from

        if (usb_pcwd == NULL) {
                printk(KERN_ERR PFX "Out of memory\n");
                    goto error;
        }
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
上级 6bbc20bc
......@@ -705,7 +705,8 @@ static int usb_pcwd_probe(struct usb_interface *interface, const struct usb_devi
err_out_unregister_reboot:
unregister_reboot_notifier(&usb_pcwd_notifier);
error:
usb_pcwd_delete (usb_pcwd);
if (usb_pcwd)
usb_pcwd_delete(usb_pcwd);
usb_pcwd_device = NULL;
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册