Merge commit 'remotes/sf-ocera-lincan/master'
res=register_chrdev(major,DEVICE_NAME, &can_fops);
if (res<0) {
CANMSG("Error registering driver.\n");
- return -ENODEV;
+ goto register_error;
}
#ifdef CAN_WITH_RTL
CANMSG("Error unloading CAN driver, error: %d\n",res);
else
CANMSG("No CAN devices or driver setup error.\n");
- return -ENODEV;
+ register_error:
+ if ( can_del_mem_list() )
+ CANMSG("Error deallocating memory\n");
+
+ return -ENODEV;
}
void cleanup_module(void)
}
-
-long unican_bus_latency(struct msgobj_t *obj)
-{
- long latency;
- latency=obj->hostchip->baudrate;
- if(latency){
- latency=(long)HZ*1000/latency;
- }
- return latency;
-}
-
-
/* * * unican Chip Functionality * * */
int unican_enable_configuration(struct canchip_t *chip)