All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Sakari Ailus <sakari.ailus@iki.fi>,
	Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: [PATCH 6/7] s5k6a3: add missing clk_disable_unprepare
Date: Mon,  9 May 2022 11:15:52 +0200	[thread overview]
Message-ID: <20220509091553.2637089-7-hverkuil-cisco@xs4all.nl> (raw)
In-Reply-To: <20220509091553.2637089-1-hverkuil-cisco@xs4all.nl>

Fix smatch warning:

drivers/media/i2c/s5k6a3.c:234 __s5k6a3_power_on() warn: 'sensor->clock' from clk_prepare_enable() not released on lines: 234.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/media/i2c/s5k6a3.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c
index b97dd6149e90..f6ecf6f92bb2 100644
--- a/drivers/media/i2c/s5k6a3.c
+++ b/drivers/media/i2c/s5k6a3.c
@@ -213,7 +213,7 @@ static int __s5k6a3_power_on(struct s5k6a3 *sensor)
 	for (i++; i < S5K6A3_NUM_SUPPLIES; i++) {
 		ret = regulator_enable(sensor->supplies[i].consumer);
 		if (ret < 0)
-			goto error_reg_dis;
+			goto error_clk;
 	}
 
 	gpio_set_value(sensor->gpio_reset, 1);
@@ -226,6 +226,8 @@ static int __s5k6a3_power_on(struct s5k6a3 *sensor)
 	msleep(20);
 	return 0;
 
+error_clk:
+	clk_disable_unprepare(sensor->clock);
 error_reg_dis:
 	for (--i; i >= 0; --i)
 		regulator_disable(sensor->supplies[i].consumer);
-- 
2.34.1


  parent reply	other threads:[~2022-05-09  9:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09  9:15 [PATCH 0/7] Various smatch fixes Hans Verkuil
2022-05-09  9:15 ` [PATCH 1/7] v4l2-subdev.c: kvmalloc_array -> kvcalloc Hans Verkuil
2022-05-09 10:29   ` Laurent Pinchart
2022-05-09  9:15 ` [PATCH 2/7] v4l2-ctls-core.c: " Hans Verkuil
2022-05-09 10:29   ` Laurent Pinchart
2022-05-09  9:15 ` [PATCH 3/7] videobuf2-dma-sg.c: " Hans Verkuil
2022-05-09 10:29   ` Laurent Pinchart
2022-05-09  9:15 ` [PATCH 4/7] cx25821: request_irq -> devm_request_irq Hans Verkuil
2022-05-09  9:15 ` [PATCH 5/7] ccs-core.c: fix failure to call clk_disable_unprepare Hans Verkuil
2022-05-09  9:15 ` Hans Verkuil [this message]
2022-05-09  9:15 ` [PATCH 7/7] uvc_v4l2.c: avoid using iterator used outside loop Hans Verkuil
2022-05-09 10:04   ` Sakari Ailus
2022-05-09 10:09   ` Laurent Pinchart

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=20220509091553.2637089-7-hverkuil-cisco@xs4all.nl \
    --to=hverkuil-cisco@xs4all.nl \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@iki.fi \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.