Skip to content

Commit

Permalink
bna: add missing iounmap() on error in bnad_init()
Browse files Browse the repository at this point in the history
Add the missing iounmap() before return from bnad_init()
in the error handling case.
Introduced by commit 01b54b1
(bna: tx rx cleanup fix).

Signed-off-by: Wei Yongjun <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wei Yongjun authored and davem330 committed May 13, 2013
1 parent ef38079 commit ba21fc6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/ethernet/brocade/bna/bnad.c
Original file line number Diff line number Diff line change
Expand Up @@ -3236,9 +3236,10 @@ bnad_init(struct bnad *bnad,

sprintf(bnad->wq_name, "%s_wq_%d", BNAD_NAME, bnad->id);
bnad->work_q = create_singlethread_workqueue(bnad->wq_name);

if (!bnad->work_q)
if (!bnad->work_q) {
iounmap(bnad->bar0);
return -ENOMEM;
}

return 0;
}
Expand Down

0 comments on commit ba21fc6

Please sign in to comment.