mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
greybus: camera: destroy data connection on link-config errors
Make sure to tear down the data connection also on failure to configure the link by setting the data_connected flag immediately after creating the connection. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
b9f71bc854
commit
41c2395855
1 changed files with 2 additions and 2 deletions
|
@ -604,6 +604,8 @@ static int gb_camera_connection_init(struct gb_connection *connection)
|
|||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
gcam->data_connected = true;
|
||||
|
||||
ret = gb_svc_link_config(svc, connection->intf->interface_id,
|
||||
GB_SVC_LINK_CONFIG_BURST_HS_A, 2, 2, 0);
|
||||
if (ret < 0)
|
||||
|
@ -614,8 +616,6 @@ static int gb_camera_connection_init(struct gb_connection *connection)
|
|||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
gcam->data_connected = true;
|
||||
|
||||
ret = gb_camera_debugfs_init(gcam);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
|
Loading…
Reference in a new issue