Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9d1a0b8 authored by Adrian Bunk's avatar Adrian Bunk Committed by Wim Van Sebroeck
Browse files

[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: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
parent 6bbc20bc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -705,6 +705,7 @@ err_out_misc_deregister:
err_out_unregister_reboot:
	unregister_reboot_notifier(&usb_pcwd_notifier);
error:
	if (usb_pcwd)
		usb_pcwd_delete(usb_pcwd);
	usb_pcwd_device = NULL;
	return retval;