media: uvcvideo: Cleanup uvc_ctrl_add_info() error handling
authorHans de Goede <hdegoede@redhat.com>
Tue, 28 Jul 2020 11:22:09 +0000 (13:22 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 10 Sep 2020 12:06:27 +0000 (14:06 +0200)
commitbed888de658afe1c383f27f73b3afa8d89a4ff9a
tree399185816e9ceafe94066be952ff61191ce0addc
parent93df48d37c3f03886d84831992926333e7810640
media: uvcvideo: Cleanup uvc_ctrl_add_info() error handling

There is only 1 error exit in uvc_ctrl_add_info(), so using goto style
error handling is not necessary. Also the kfree(ctrl->uvc_data) on error
is not necessary, because the only error exit is for the kzalloc() of
ctrl->uvc_data failing.

Remove all the error handling cruft and simply do "return -ENOMEM" on
kzalloc() failure.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/uvc/uvc_ctrl.c