Merge tag 'tty-5.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[linux-2.6-microblaze.git] / drivers / net / hamradio / mkiss.c
index e3294a0..8666110 100644 (file)
@@ -276,7 +276,7 @@ static void ax_bump(struct mkiss *ax)
                         */
                        *ax->rbuff &= ~0x20;
                }
-       }
+       }
 
        count = ax->rcount;
 
@@ -501,7 +501,7 @@ static void ax_encaps(struct net_device *dev, unsigned char *icp, int len)
                default:
                        count = kiss_esc(p, ax->xbuff, len);
                }
-       }
+       }
        spin_unlock_bh(&ax->buflock);
 
        set_bit(TTY_DO_WRITE_WAKEUP, &ax->tty->flags);
@@ -799,6 +799,7 @@ static void mkiss_close(struct tty_struct *tty)
        ax->tty = NULL;
 
        unregister_netdev(ax->dev);
+       free_netdev(ax->dev);
 }
 
 /* Perform I/O control on an active ax25 channel. */
@@ -815,7 +816,7 @@ static int mkiss_ioctl(struct tty_struct *tty, struct file *file,
        dev = ax->dev;
 
        switch (cmd) {
-       case SIOCGIFNAME:
+       case SIOCGIFNAME:
                err = copy_to_user((void __user *) arg, ax->dev->name,
                                   strlen(ax->dev->name) + 1) ? -EFAULT : 0;
                break;