staging: vt6655: Fix memory leak in vt6655_probe
Subsystems (2)
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.
--- drivers/staging/vt6655/device_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/staging/vt6655/device_main.c +3 -1
@@ -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
Quoted 3 lines
In
vt6655_probe, ifvnt_init()fails the cleanup code needs to be called like other error handling cases. The call todevice_free_info()is added.
Please improve this change description.
Regards,
Markus
Greg Kroah-Hartman
maintainerQuoted 5 lines · Markus Elfring
Quoted 3 lines
In
vt6655_probe, ifvnt_init()fails the cleanup code needs to be called like other error handling cases. The call todevice_free_info()is added.Please improve this change description.
It is fine as-is, please do not confuse people.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
In
vt6655_probe, ifvnt_init()fails the cleanup code needs to be called like other error handling cases. The call todevice_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