Thread (2 messages) 2 messages, 2 authors, 2020-07-28

Re: [PATCH] usb: hso: check for return value in hso_serial_common_create()

From: Markus Elfring <hidden>
Date: 2020-07-28 13:19:20
Also in: kernel-janitors, lkml, netdev

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 hunk
+++ b/drivers/net/usb/hso.c
quoted hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help