cosa: missing error code on failure in probe()
Subsystems (3)
PATCH 1/1 cosa: missing error code on failure in probe()
If register_hdlc_device() fails, the current code returns 0 but we should return an error code instead.
Signed-off-by Dan Carpenter <[email protected]>
drivers/net/wan/cosa.c +2 -1
@@ -589,7 +589,8 @@ static int cosa_probe(int base, int irq, int dma) chan->netdev->base_addr = chan->cosa->datareg; chan->netdev->irq = chan->cosa->irq; chan->netdev->dma = chan->cosa->dma; -if (register_hdlc_device (chan->netdev)) { + err =register_hdlc_device (chan->netdev); +if (err) {netdev_warn (chan->netdev,"register_hdlc_device() failed\n" );free_netdev (chan->netdev);
From: Dan Carpenter <[email protected]>
Date: Thu, 13 Aug 2015 00:08:01 +0300
Quoted 4 lines
If
register_hdlc_device()fails, the current code returns 0 but we should return an error code instead.Signed-off-by Dan Carpenter <[email protected]>
Applied, thanks Dan.