Message ID | 20200325210036.GA31405@deeUbuntu |
---|---|
State | New |
Headers | show |
Series | media: staging/intel-ipu3: Simplify single goto jump | expand |
diff --git a/drivers/staging/media/ipu3/ipu3-v4l2.c b/drivers/staging/media/ipu3/ipu3-v4l2.c index e8f33539a217..bd8cb7571038 100644 --- a/drivers/staging/media/ipu3/ipu3-v4l2.c +++ b/drivers/staging/media/ipu3/ipu3-v4l2.c @@ -1295,15 +1295,13 @@ static int imgu_v4l2_nodes_setup_pipe(struct imgu_device *imgu, int pipe) for (i = 0; i < IMGU_NODE_NUM; i++) { r = imgu_v4l2_node_setup(imgu, pipe, i); - if (r) - goto cleanup; + if (r) { + imgu_v4l2_nodes_cleanup_pipe(imgu, pipe, i); + return r; + } } return 0; - -cleanup: - imgu_v4l2_nodes_cleanup_pipe(imgu, pipe, i); - return r; } static void imgu_v4l2_subdev_cleanup(struct imgu_device *imgu, unsigned int i)