From: Adrian Bunk <bunk@kernel.org>
To: Martin Bachem <info@colognechip.com>, Karsten Keil <kkeil@suse.de>
Cc: isdn4linux@listserv.isdn4linux.de, linux-kernel@vger.kernel.org
Subject: [2.6 patch] isdn/hisax/hfc_usb.c: fix check-after-use
Date: Tue, 18 Sep 2007 20:14:25 +0200 [thread overview]
Message-ID: <20070918181425.GB16401@stusta.de> (raw)
This patch fixes a check-after-use spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
---
drivers/isdn/hisax/hfc_usb.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
53472364f051d7e80182a5eb12d3853353e393be
diff --git a/drivers/isdn/hisax/hfc_usb.c b/drivers/isdn/hisax/hfc_usb.c
index 60843b3..92a796d 100644
--- a/drivers/isdn/hisax/hfc_usb.c
+++ b/drivers/isdn/hisax/hfc_usb.c
@@ -1520,14 +1520,15 @@ hfc_usb_disconnect(struct usb_interface
hfcusb_data *context = usb_get_intfdata(intf);
int i;
+ if (!context)
+ return;
+
handle_led(context, LED_POWER_OFF);
schedule_timeout((10 * HZ) / 1000);
printk(KERN_INFO "HFC-S USB: device disconnect\n");
context->disc_flag = 1;
usb_set_intfdata(intf, NULL);
- if (!context)
- return;
if (timer_pending(&context->t3_timer))
del_timer(&context->t3_timer);
if (timer_pending(&context->t4_timer))
reply other threads:[~2007-09-18 18:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070918181425.GB16401@stusta.de \
--to=bunk@kernel.org \
--cc=info@colognechip.com \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=kkeil@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®