mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [2.6 patch] isdn/hisax/hfc_usb.c: fix check-after-use
@ 2007-09-18 18:14 Adrian Bunk
  0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2007-09-18 18:14 UTC (permalink / raw)
  To: Martin Bachem, Karsten Keil; +Cc: isdn4linux, linux-kernel

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))


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-18 18:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-18 18:14 [2.6 patch] isdn/hisax/hfc_usb.c: fix check-after-use Adrian Bunk

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®