Skip to content
Commit bed888de authored by Hans de Goede's avatar Hans de Goede Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 93df48d3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment