summaryrefslogtreecommitdiffstats
path: root/drivers/net/caif/caif_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/caif/caif_serial.c')
-rw-r--r--drivers/net/caif/caif_serial.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index d17482395a4d..4ffbfd534f18 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -350,6 +350,7 @@ static int ldisc_open(struct tty_struct *tty)
rtnl_lock();
result = register_netdevice(dev);
if (result) {
+ tty_kref_put(tty);
rtnl_unlock();
free_netdev(dev);
return -ENODEV;