Message ID | 1622355874-18933-3-git-send-email-huangguangbin2@huawei.com |
---|---|
State | New |
Headers | show |
Series | net: sealevel: clean up some code style issues | expand |
diff --git a/drivers/net/wan/sealevel.c b/drivers/net/wan/sealevel.c index 62cc59892d1e..829e9bc01a49 100644 --- a/drivers/net/wan/sealevel.c +++ b/drivers/net/wan/sealevel.c @@ -174,6 +174,7 @@ static const struct net_device_ops sealevel_ops = { static int slvl_setup(struct slvl_device *sv, int iobase, int irq) { struct net_device *dev = alloc_hdlcdev(sv); + if (!dev) return -1; @@ -334,6 +335,7 @@ static void __exit slvl_shutdown(struct slvl_board *b) for (u = 0; u < 2; u++) { struct net_device *d = b->dev[u].chan->netdevice; + unregister_hdlc_device(d); free_netdev(d); }