]> git.baikalelectronics.ru Git - kernel.git/commit
usb: hub: Simplify error and success path in port_over_current_notify
authorBhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>
Thu, 12 May 2022 15:37:14 +0000 (17:37 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 16:14:49 +0000 (18:14 +0200)
commit6d43769bb8ed8524dcd199831e309404fc24e7a8
tree14f53d97d9889bc109365dfd1efea8865518894a
parentb76814282e32bf5e04095063181cbcd5f1ed2ea7
usb: hub: Simplify error and success path in port_over_current_notify

kasprintf() returns NULL or valid pointer. Since kfree() can handle
NULL pointer condition, simplify error and success paths in function
port_over_current_notify() by removing multiple error path labels.

Signed-off-by: Bhuvanesh Surachari <Bhuvanesh_Surachari@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Link: https://lore.kernel.org/r/1652369834-4480-1-git-send-email-erosca@de.adit-jv.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c