[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202211100829.085BC218E@keescook>
Date: Thu, 10 Nov 2022 08:29:38 -0800
From: coverity-bot <keescook@...omium.org>
To: Marco Felsch <m.felsch@...gutronix.de>
Cc: linux-kernel@...r.kernel.org,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Jean-Michel Hautbois <jeanmichel.hautbois@...asonboard.com>,
Shawn Tu <shawnx.tu@...el.com>, linux-media@...r.kernel.org,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
Hans Verkuil <hverkuil@...all.nl>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
"Gustavo A. R. Silva" <gustavo@...eddedor.com>,
linux-next@...r.kernel.org, linux-hardening@...r.kernel.org
Subject: Coverity: tc358746_g_register(): Error handling issues
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20221110 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Thu Oct 27 14:48:40 2022 +0300
80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Coverity reported the following:
*** CID 1527254: Error handling issues (CHECKED_RETURN)
drivers/media/i2c/tc358746.c:998 in tc358746_g_register()
992 /* 32-bit registers starting from CLW_DPHYCONTTX */
993 reg->size = reg->reg < CLW_DPHYCONTTX_REG ? 2 : 4;
994
995 if (!pm_runtime_get_if_in_use(sd->dev))
996 return 0;
997
vvv CID 1527254: Error handling issues (CHECKED_RETURN)
vvv Calling "tc358746_read" without checking return value (as is done elsewhere 5 out of 6 times).
998 tc358746_read(tc358746, reg->reg, (u32 *)®->val);
999
1000 pm_runtime_mark_last_busy(sd->dev);
1001 pm_runtime_put_sync_autosuspend(sd->dev);
1002
1003 return 0;
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@...omium.org>
Addresses-Coverity-ID: 1527254 ("Error handling issues")
Fixes: 80a21da36051 ("media: tc358746: add Toshiba TC358746 Parallel to CSI-2 bridge driver")
Thanks for your attention!
--
Coverity-bot
Powered by blists - more mailing lists