caif-hsi: Add missing return in error path
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>
This commit is contained in:
parent
3935600a7f
commit
1fdc7630b2
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue