fix two kind-of-bugs found by Stanford checker (Rob Radez/me)
This commit is contained in:
parent
483673a6d3
commit
2b18963fc0
|
@ -2907,17 +2907,8 @@ isdn_net_init(struct net_device *ndev)
|
|||
{
|
||||
ushort max_hlhdr_len = 0;
|
||||
isdn_net_local *lp = (isdn_net_local *) ndev->priv;
|
||||
int drvidx,
|
||||
i;
|
||||
int drvidx, i;
|
||||
|
||||
if (ndev == NULL) {
|
||||
printk(KERN_WARNING "isdn_net_init: dev = NULL!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
if (ndev->priv == NULL) {
|
||||
printk(KERN_WARNING "isdn_net_init: dev->priv = NULL!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
ether_setup(ndev);
|
||||
lp->org_hhc = ndev->hard_header_cache;
|
||||
lp->org_hcu = ndev->header_cache_update;
|
||||
|
|
|
@ -1182,8 +1182,6 @@ isdn_tty_write(struct tty_struct *tty, int from_user, const u_char * buf, int co
|
|||
|
||||
if (isdn_tty_paranoia_check(info, tty->device, "isdn_tty_write"))
|
||||
return 0;
|
||||
if (!tty)
|
||||
return 0;
|
||||
if (from_user)
|
||||
down(&info->write_sem);
|
||||
/* See isdn_tty_senddown() */
|
||||
|
|
Loading…
Reference in New Issue