From: Arnd Bergmann <arnd@arndb.de>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Pavel Machek <pavel@ucw.cz>, Sebastian Reichel <sre@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] media: omap3isp: fix uninitialized variable use
Date: Wed, 23 Aug 2017 15:30:19 +0200 [thread overview]
Message-ID: <20170823133044.686146-1-arnd@arndb.de> (raw)
A debug printk statement was copied incorrectly into the new
csi1 parser code and causes a warning there:
drivers/media/platform/omap3isp/isp.c: In function 'isp_probe':
include/linux/dynamic_debug.h:134:3: error: 'i' may be used uninitialized in this function [-Werror=maybe-uninitialized]
Since there is only one lane, the index is never set. This
changes the debug print to always print a zero instead,
keeping the original format of the message.
Fixes: 9211434bad30 ("media: omap3isp: Parse CSI1 configuration from the device tree")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/media/platform/omap3isp/isp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c
index 83aea08b832d..30c825bf80d9 100644
--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2092,7 +2092,7 @@ static int isp_fwnode_parse(struct device *dev, struct fwnode_handle *fwnode,
buscfg->bus.ccp2.lanecfg.data[0].pol =
vep.bus.mipi_csi1.lane_polarity[1];
- dev_dbg(dev, "data lane %u polarity %u, pos %u\n", i,
+ dev_dbg(dev, "data lane 0 polarity %u, pos %u\n",
buscfg->bus.ccp2.lanecfg.data[0].pol,
buscfg->bus.ccp2.lanecfg.data[0].pos);
--
2.9.0
next reply other threads:[~2017-08-23 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-23 13:30 Arnd Bergmann [this message]
2017-08-23 13:55 ` [PATCH] media: omap3isp: fix uninitialized variable use Laurent Pinchart
2017-08-23 13:58 ` Sakari Ailus
2017-08-23 15:35 ` Sebastian Reichel
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=20170823133044.686146-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=pavel@ucw.cz \
--cc=sakari.ailus@linux.intel.com \
--cc=sre@kernel.org \
/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.