fixes a check-after-use spotted by the Coverity checker (Signed-off-by:
Adrian Bunk <bunk@kernel.org>)
This commit is contained in:
parent
38a76cac93
commit
d08abd7031
|
@ -1520,14 +1520,16 @@ 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))
|
||||
|
|
Loading…
Reference in New Issue