Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6d00693 authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e941ba86
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);