bnx2fc: fix an error code in _bnx2fc_create()
We should be returning an error code here instead of success. Either -ENODEV or -ENOMEM would work. There is also a failure message in printk(). Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Chad Dupuis <chad.dupuis@qlogic.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
b6829c72df
commit
2043e1fd09
1 changed files with 1 additions and 0 deletions
|
@ -2195,6 +2195,7 @@ static int _bnx2fc_create(struct net_device *netdev,
|
||||||
interface = bnx2fc_interface_create(hba, netdev, fip_mode);
|
interface = bnx2fc_interface_create(hba, netdev, fip_mode);
|
||||||
if (!interface) {
|
if (!interface) {
|
||||||
printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
|
printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
|
||||||
|
rc = -ENOMEM;
|
||||||
goto ifput_err;
|
goto ifput_err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue