* [PATCH] bna: add missing iounmap() on error in bnad_init()
@ 2013-05-13 7:26 Wei Yongjun
2013-05-13 14:01 ` Sergei Shtylyov
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-05-13 7:26 UTC (permalink / raw)
To: rmody, huangj, davem; +Cc: yongjun_wei, netdev
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing iounmap() before return from bnad_init()
in the error handling case.
Introduced by commit 01b54b1451853593739816a392485c4e2bee7dda
(bna: tx rx cleanup fix).
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
drivers/net/ethernet/brocade/bna/bnad.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
index ce4a030..59da9eb 100644
--- a/drivers/net/ethernet/brocade/bna/bnad.c
+++ b/drivers/net/ethernet/brocade/bna/bnad.c
@@ -3237,8 +3237,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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bna: add missing iounmap() on error in bnad_init()
2013-05-13 7:26 [PATCH] bna: add missing iounmap() on error in bnad_init() Wei Yongjun
@ 2013-05-13 14:01 ` Sergei Shtylyov
0 siblings, 0 replies; 2+ messages in thread
From: Sergei Shtylyov @ 2013-05-13 14:01 UTC (permalink / raw)
To: Wei Yongjun; +Cc: rmody, huangj, davem, yongjun_wei, netdev
Hello.
On 13-05-2013 11:26, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> Add the missing iounmap() before return from bnad_init()
> in the error handling case.
> Introduced by commit 01b54b1451853593739816a392485c4e2bee7dda
> (bna: tx rx cleanup fix).
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
> drivers/net/ethernet/brocade/bna/bnad.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
> diff --git a/drivers/net/ethernet/brocade/bna/bnad.c b/drivers/net/ethernet/brocade/bna/bnad.c
> index ce4a030..59da9eb 100644
> --- a/drivers/net/ethernet/brocade/bna/bnad.c
> +++ b/drivers/net/ethernet/brocade/bna/bnad.c
> @@ -3237,8 +3237,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);
>
Empty line not needed here -- maybe it's time to delete it?
> - if (!bnad->work_q)
> + if (!bnad->work_q) {
> + iounmap(bnad->bar0);
> return -ENOMEM;
> + }
>
> return 0;
> }
WBR, Sergei
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-13 14:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-13 7:26 [PATCH] bna: add missing iounmap() on error in bnad_init() Wei Yongjun
2013-05-13 14:01 ` Sergei Shtylyov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).