[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150810213922.GA3380@mwanda>
Date: Tue, 11 Aug 2015 00:39:22 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: "David S. Miller" <davem@...emloft.net>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>,
netdev@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
RUC_Soft_Sec <zy900702@....com>
Subject: [patch] hamradio/kiss: missing error code in mkiss_open()
If register_netdev() fails we return success but we should return an
error code instead.
Reported-by: RUC_Soft_Sec <zy900702@....com>
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
diff --git a/drivers/net/hamradio/mkiss.c b/drivers/net/hamradio/mkiss.c
index 2ffbf13..dcb6bb7 100644
--- a/drivers/net/hamradio/mkiss.c
+++ b/drivers/net/hamradio/mkiss.c
@@ -732,7 +732,8 @@ static int mkiss_open(struct tty_struct *tty)
goto out_free_netdev;
}
- if (register_netdev(dev))
+ err = register_netdev(dev);
+ if (err)
goto out_free_buffers;
/* after register_netdev() - because else printk smashes the kernel */
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists