* [PATCH] staging: vt6655: Fix memory leak in vt6655_probe
@ 2019-10-04 20:03 Navid Emamdoost
2019-10-05 16:30 ` Markus Elfring
0 siblings, 1 reply; 4+ messages in thread
From: Navid Emamdoost @ 2019-10-04 20:03 UTC (permalink / raw)
Cc: emamd001, kjlu, smccaman, Navid Emamdoost, Forest Bond,
Greg Kroah-Hartman, Malcolm Priestley, Madhumitha Prabakaran,
Luis Chamberlain, devel, linux-kernel
In vt6655_probe, if vnt_init() fails the cleanup code needs to be called
like other error handling cases. The call to device_free_info() is
added.
Fixes: 67013f2c0e58 ("staging: vt6655: mac80211 conversion add main mac80211 functions")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
---
drivers/staging/vt6655/device_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index c6bb4aaf9bd0..082302944c37 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -1748,8 +1748,10 @@ vt6655_probe(struct pci_dev *pcid, const struct pci_device_id *ent)
priv->hw->max_signal = 100;
- if (vnt_init(priv))
+ if (vnt_init(priv)) {
+ device_free_info(priv);
return -ENODEV;
+ }
device_print_info(priv);
pci_set_drvdata(pcid, priv);
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vt6655: Fix memory leak in vt6655_probe
2019-10-04 20:03 [PATCH] staging: vt6655: Fix memory leak in vt6655_probe Navid Emamdoost
@ 2019-10-05 16:30 ` Markus Elfring
2019-10-05 18:40 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2019-10-05 16:30 UTC (permalink / raw)
To: Navid Emamdoost, devel
Cc: Navid Emamdoost, Kangjie Lu, Stephen McCamant, Forest Bond,
Greg Kroah-Hartman, Luis Chamberlain, Madhumitha Prabakaran,
Malcolm Priestley, linux-kernel, kernel-janitors
> In vt6655_probe, if vnt_init() fails the cleanup code needs to be called
> like other error handling cases. The call to device_free_info() is
> added.
Please improve this change description.
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: vt6655: Fix memory leak in vt6655_probe
2019-10-05 16:30 ` Markus Elfring
@ 2019-10-05 18:40 ` Greg Kroah-Hartman
2019-10-06 5:39 ` Markus Elfring
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2019-10-05 18:40 UTC (permalink / raw)
To: Markus Elfring
Cc: Navid Emamdoost, devel, kernel-janitors, Malcolm Priestley,
Kangjie Lu, linux-kernel, Madhumitha Prabakaran,
Luis Chamberlain, Navid Emamdoost, Forest Bond, Stephen McCamant
On Sat, Oct 05, 2019 at 06:30:13PM +0200, Markus Elfring wrote:
> > In vt6655_probe, if vnt_init() fails the cleanup code needs to be called
> > like other error handling cases. The call to device_free_info() is
> > added.
>
> Please improve this change description.
It is fine as-is, please do not confuse people.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: staging: vt6655: Fix memory leak in vt6655_probe
2019-10-05 18:40 ` Greg Kroah-Hartman
@ 2019-10-06 5:39 ` Markus Elfring
0 siblings, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2019-10-06 5:39 UTC (permalink / raw)
To: Greg Kroah-Hartman, Navid Emamdoost, devel, kernel-janitors
Cc: linux-kernel, Navid Emamdoost, Kangjie Lu, Stephen McCamant,
Forest Bond, Luis Chamberlain, Madhumitha Prabakaran,
Malcolm Priestley
>>> In vt6655_probe, if vnt_init() fails the cleanup code needs to be called
>>> like other error handling cases. The call to device_free_info() is
>>> added.
>>
>> Please improve this change description.
>
> It is fine as-is, please do not confuse people.
Would you like to clarify a known guideline once more?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=43b815c6a8e7dbccb5b8bd9c4b099c24bc22d135#n151
“…
Describe your changes in imperative mood,
…”
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-06 5:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-04 20:03 [PATCH] staging: vt6655: Fix memory leak in vt6655_probe Navid Emamdoost
2019-10-05 16:30 ` Markus Elfring
2019-10-05 18:40 ` Greg Kroah-Hartman
2019-10-06 5:39 ` Markus Elfring
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).