Skip to contentSkip to conversation

usb: hso: check for return value in hso_serial_common_create()

PATCH Markus Elfring 2 participants 2 messages Jul 28, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw
Quoted 2 lines

in case of an error tty_register_device_attr() returns ERR_PTR(), add IS_ERR() check

I suggest to improve this change description a bit.

Will the tag “Fixes” become helpful for the commit message?

…

Quoted 1 line

+++ b/drivers/net/usb/hso.c

…

Review static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, · line 2319

Quoted 8 lines
(quoted diff) +1 -0
@@ -2311,6 +2313,7 @@  static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
 	return 0;
 exit:
 	hso_serial_tty_unregister(serial);
+exit2:
 	hso_serial_common_free(serial);
 	return -1;
 }

Can other labels (like “unregister_serial” and “free_serial”) be preferred here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id=92ed301919932f777713b9172e525674157e983d#n485

Regards,
Markus

#1 lore raw
Quoted 23 lines · Markus Elfring
Quoted 2 lines

in case of an error tty_register_device_attr() returns ERR_PTR(), add IS_ERR() check

I suggest to improve this change description a bit.

Will the tag “Fixes� become helpful for the commit message?

…

Quoted 1 line

+++ b/drivers/net/usb/hso.c

…

Review static int hso_serial_common_create(struct hso_serial *serial, int num_urbs, · line 2319

Quoted 8 lines
(quoted diff) +1 -0
@@ -2311,6 +2313,7 @@  static int hso_serial_common_create(struct hso_serial *serial, int num_urbs,
 	return 0;
 exit:
 	hso_serial_tty_unregister(serial);
+exit2:
 	hso_serial_common_free(serial);
 	return -1;
 }

Can other labels (like “unregister_serial� and “free_serial�) be preferred here?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?id’ed301919932f777713b9172e525674157e983d#n485

Quoted 2 lines

Regards,
Markus

Hi,

This is the semi-friendly patch-bot of Greg Kroah-Hartman.

Markus, you seem to have sent a nonsensical or otherwise pointless review comment to a patch submission on a Linux kernel developer mailing list. I strongly suggest that you not do this anymore. Please do not bother developers who are actively working to produce patches and features with comments that, in the end, are a waste of time.

Patch submitter, please ignore Markus's suggestion; you do not need to follow it at all. The person/bot/AI that sent it is being ignored by almost all Linux kernel maintainers for having a persistent pattern of behavior of producing distracting and pointless commentary, and inability to adapt to feedback. Please feel free to also ignore emails from them.

thanks,

greg k-h's patch email bot