diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-03-10 13:04:38 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2006-04-02 12:51:50 -0400 |
commit | c9d1a0b8d52e7539e22f3c3190f8b6e0c80b6cfe (patch) | |
tree | ea27a7a0e334f925eb6e42fb060d252c8439166a /drivers | |
parent | 6bbc20bc0b5d9c5a351fb3a027e60e396c1329a6 (diff) |
[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: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/watchdog/pcwd_usb.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/watchdog/pcwd_usb.c b/drivers/char/watchdog/pcwd_usb.c index 2700c5c45b8a..3fdfda9324fa 100644 --- a/drivers/char/watchdog/pcwd_usb.c +++ b/drivers/char/watchdog/pcwd_usb.c | |||
@@ -705,7 +705,8 @@ err_out_misc_deregister: | |||
705 | err_out_unregister_reboot: | 705 | err_out_unregister_reboot: |
706 | unregister_reboot_notifier(&usb_pcwd_notifier); | 706 | unregister_reboot_notifier(&usb_pcwd_notifier); |
707 | error: | 707 | error: |
708 | usb_pcwd_delete (usb_pcwd); | 708 | if (usb_pcwd) |
709 | usb_pcwd_delete(usb_pcwd); | ||
709 | usb_pcwd_device = NULL; | 710 | usb_pcwd_device = NULL; |
710 | return retval; | 711 | return retval; |
711 | } | 712 | } |