mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-23 04:54:01 +08:00
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 <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e941ba8650
commit
e6d006938c
@ -589,7 +589,8 @@ static int cosa_probe(int base, int irq, int dma)
|
|||||||
chan->netdev->base_addr = chan->cosa->datareg;
|
chan->netdev->base_addr = chan->cosa->datareg;
|
||||||
chan->netdev->irq = chan->cosa->irq;
|
chan->netdev->irq = chan->cosa->irq;
|
||||||
chan->netdev->dma = chan->cosa->dma;
|
chan->netdev->dma = chan->cosa->dma;
|
||||||
if (register_hdlc_device(chan->netdev)) {
|
err = register_hdlc_device(chan->netdev);
|
||||||
|
if (err) {
|
||||||
netdev_warn(chan->netdev,
|
netdev_warn(chan->netdev,
|
||||||
"register_hdlc_device() failed\n");
|
"register_hdlc_device() failed\n");
|
||||||
free_netdev(chan->netdev);
|
free_netdev(chan->netdev);
|
||||||
|
Loading…
Reference in New Issue
Block a user