Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1373281 > unrolled thread
| Started by | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| First post | 2016-04-07 13:20 +0200 |
| Last post | 2016-04-08 19:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ieee802154/adf7242: fix memory leak of firmware Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-04-07 13:20 +0200
Re: [PATCH] ieee802154/adf7242: fix memory leak of firmware Marcel Holtmann <marcel@holtmann.org> - 2016-04-08 19:40 +0200
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Date | 2016-04-07 13:20 +0200 |
| Subject | [PATCH] ieee802154/adf7242: fix memory leak of firmware |
| Message-ID | <rlg8F-2Yy-15@gated-at.bofh.it> |
If the firmware upload or the firmware verification fails then we
printed the error message and exited but we missed releasing the
firmware.
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
---
drivers/net/ieee802154/adf7242.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
index 89154c0..91d4531 100644
--- a/drivers/net/ieee802154/adf7242.c
+++ b/drivers/net/ieee802154/adf7242.c
@@ -1030,6 +1030,7 @@ static int adf7242_hw_init(struct adf7242_local *lp)
if (ret) {
dev_err(&lp->spi->dev,
"upload firmware failed with %d\n", ret);
+ release_firmware(fw);
return ret;
}
@@ -1037,6 +1038,7 @@ static int adf7242_hw_init(struct adf7242_local *lp)
if (ret) {
dev_err(&lp->spi->dev,
"verify firmware failed with %d\n", ret);
+ release_firmware(fw);
return ret;
}
--
1.9.1
[toc] | [next] | [standalone]
| From | Marcel Holtmann <marcel@holtmann.org> |
|---|---|
| Date | 2016-04-08 19:40 +0200 |
| Message-ID | <rlIxY-7r6-37@gated-at.bofh.it> |
| In reply to | #1373281 |
Hi Sudip, > If the firmware upload or the firmware verification fails then we > printed the error message and exited but we missed releasing the > firmware. > > Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> > --- > drivers/net/ieee802154/adf7242.c | 2 ++ > 1 file changed, 2 insertions(+) patch has been applied to bluetooth-next tree. Regards Marcel
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web