return 0;
}
-static int sja1000_report_error_limit_counter;
+// static int sja1000_report_error_limit_counter;
static void sja1000_report_error(struct canchip_t *chip,
unsigned sr, unsigned ir, unsigned ecc)
if (test_bit(USBCAN_ERROR,&dev->flags)){
CANMSG("URB error %d\n",retval);
- break;
+ clear_bit(USBCAN_ERROR,&dev->flags);
}
{ /* Normal work to do */
err("Out of memory");
goto error;
}
+ memset(dev, 0, sizeof(struct usbcan_usb));
sema_init(&dev->limit_sem, WRITES_IN_FLIGHT);
spin_lock_init(&dev->err_lock);
int minor = interface->minor;
dev = usb_get_intfdata(interface);
+ if (!dev)
+ return;
usb_set_intfdata(interface, NULL);
/* prevent more I/O from starting */