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 1f52ff3..4a27adb 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);