From: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
To: linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-staging@lists.linux.dev
Cc: Yong Deng <yong.deng@magewell.com>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Chen-Yu Tsai <wens@csie.org>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Samuel Holland <samuel@sholland.org>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Sakari Ailus <sakari.ailus@iki.fi>
Subject: [PATCH 5/9] media: sun8i-a83t-mipi-csi2: Fix return code handling in stream off path
Date: Thu, 8 Dec 2022 12:47:38 +0100 [thread overview]
Message-ID: <20221208114742.399461-6-paul.kocialkowski@bootlin.com> (raw)
In-Reply-To: <20221208114742.399461-1-paul.kocialkowski@bootlin.com>
Explicitly set ret to zero instead of assigning it and overwriting it later,
which is a bit confusing to understand.
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
---
.../sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
index d993c09a4820..cd2e92ae2293 100644
--- a/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
+++ b/drivers/media/platform/sunxi/sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c
@@ -220,7 +220,8 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
return -ENODEV;
if (!on) {
- ret = v4l2_subdev_call(source_subdev, video, s_stream, 0);
+ v4l2_subdev_call(source_subdev, video, s_stream, 0);
+ ret = 0;
goto disable;
}
@@ -312,8 +313,6 @@ static int sun8i_a83t_mipi_csi2_s_stream(struct v4l2_subdev *subdev, int on)
return 0;
disable:
- if (!on)
- ret = 0;
phy_power_off(dphy);
sun8i_a83t_mipi_csi2_disable(csi2_dev);
--
2.38.1
next prev parent reply other threads:[~2022-12-08 11:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-08 11:47 [PATCH 0/9] Allwinner A31/A83T CSI/ISP/MIPI CSI-2 media fixes Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 1/9] media: sun6i-csi: bridge: Fix return code handling in stream off path Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 2/9] media: sun6i-csi: capture: Remove useless ret initialization Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 3/9] media: sun6i-csi: bridge: Error out on invalid port to fix warning Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 4/9] media: sun6i-mipi-csi2: Fix return code handling in stream off path Paul Kocialkowski
2022-12-08 11:47 ` Paul Kocialkowski [this message]
2022-12-08 11:47 ` [PATCH 6/9] media: sun6i-isp: bridge: " Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 7/9] media: sun6i-isp: bridge: Error out on invalid port to fix warning Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 8/9] media: sun6i-isp: capture: Fix uninitialized variable use Paul Kocialkowski
2022-12-08 11:47 ` [PATCH 9/9] media: sun6i-isp: params: Fix incorrect indentation Paul Kocialkowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221208114742.399461-6-paul.kocialkowski@bootlin.com \
--to=paul.kocialkowski@bootlin.com \
--cc=hverkuil@xs4all.nl \
--cc=jernej.skrabec@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=linux-sunxi@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=samuel@sholland.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=wens@csie.org \
--cc=yong.deng@magewell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox