Skip to contentSkip to conversation

staging: vt6655: Fix memory leak in vt6655_probe

PATCH In review Navid Emamdoost 3 participants 4 messages Oct 4, 2019 – Oct 6, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vt6655: Fix memory leak in vt6655_probe

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")
---
 drivers/staging/vt6655/device_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +3 -1
index c6bb4aaf9bd0..082302944c37 100644
@@ -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);
Signature · 1 line
2.17.1
#1 lore raw
Quoted 3 lines

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

#2 lore raw
Quoted 5 lines · Markus Elfring
Quoted 3 lines

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.

#3 lore raw
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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