From: Dan Carpenter <dan.carpenter@oracle.com>
To: martinax.krasteva@intel.com
Cc: linux-media@vger.kernel.org
Subject: [bug report] media: i2c: Add imx334 camera sensor driver
Date: Tue, 9 Feb 2021 13:54:48 +0300 [thread overview]
Message-ID: <YCJp+LrFNtVWAmr7@mwanda> (raw)
Hello Martina Krasteva,
The patch 9746b11715c3: "media: i2c: Add imx334 camera sensor driver"
from Feb 3, 2021, leads to the following static checker warning:
drivers/media/i2c/imx334.c:721 imx334_set_stream()
warn: pm_runtime_get_sync() also returns 1 on success
drivers/media/i2c/imx334.c
707 static int imx334_set_stream(struct v4l2_subdev *sd, int enable)
708 {
709 struct imx334 *imx334 = to_imx334(sd);
710 int ret;
711
712 mutex_lock(&imx334->mutex);
713
714 if (imx334->streaming == enable) {
715 mutex_unlock(&imx334->mutex);
716 return 0;
717 }
718
719 if (enable) {
720 ret = pm_runtime_get_sync(imx334->dev);
721 if (ret)
This needs to be: "if (ret < 0)"
722 goto error_power_off;
723
724 ret = imx334_start_streaming(imx334);
725 if (ret)
726 goto error_power_off;
727 } else {
728 imx334_stop_streaming(imx334);
729 pm_runtime_put(imx334->dev);
730 }
731
732 imx334->streaming = enable;
733
734 mutex_unlock(&imx334->mutex);
735
736 return 0;
737
738 error_power_off:
739 pm_runtime_put(imx334->dev);
740 mutex_unlock(&imx334->mutex);
741
742 return ret;
743 }
regards,
dan carpenter
reply other threads:[~2021-02-09 10:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=YCJp+LrFNtVWAmr7@mwanda \
--to=dan.carpenter@oracle.com \
--cc=linux-media@vger.kernel.org \
--cc=martinax.krasteva@intel.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 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.