]> git.baikalelectronics.ru Git - kernel.git/commitdiff
caif-hsi: Add missing return in error path
authorSjur Brændeland <sjur.brandeland@stericsson.com>
Sun, 24 Jun 2012 11:01:38 +0000 (11:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jun 2012 23:07:23 +0000 (16:07 -0700)
Fix a missing return, causing access to freed memory.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/caif/caif_hsi.c

index 1f52ff3076b41a81196baea30366c2718a7eae23..4a27adb7ae67f7011ba1ae4bfae7784405435178 100644 (file)
@@ -1178,6 +1178,7 @@ int cfhsi_probe(struct platform_device *pdev)
                dev_err(&ndev->dev, "%s: Registration error: %d.\n",
                        __func__, res);
                free_netdev(ndev);
+               return -ENODEV;
        }
        /* Add CAIF HSI device to list. */
        spin_lock(&cfhsi_list_lock);