* [PATCH v1 1/1] media: tda18250: Use %*ph to print small buffer
@ 2026-06-03 11:17 Andy Shevchenko
2026-06-03 11:35 ` sashiko-bot
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2026-06-03 11:17 UTC (permalink / raw)
To: linux-media, linux-kernel
Cc: Olli Salonen, Mauro Carvalho Chehab, Andy Shevchenko
Use %*ph format to print small buffer as hex string.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/media/tuners/tda18250.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/tuners/tda18250.c b/drivers/media/tuners/tda18250.c
index 7bb945ba0989..9dbb5ea3b487 100644
--- a/drivers/media/tuners/tda18250.c
+++ b/drivers/media/tuners/tda18250.c
@@ -804,8 +804,7 @@ static int tda18250_probe(struct i2c_client *client)
/* read the three chip ID registers */
regmap_bulk_read(dev->regmap, R00_ID1, &chip_id, 3);
- dev_dbg(&client->dev, "chip_id=%02x:%02x:%02x",
- chip_id[0], chip_id[1], chip_id[2]);
+ dev_dbg(&client->dev, "chip_id=%3phC", chip_id);
switch (chip_id[0]) {
case 0xc7:
--
2.50.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1 1/1] media: tda18250: Use %*ph to print small buffer
2026-06-03 11:17 [PATCH v1 1/1] media: tda18250: Use %*ph to print small buffer Andy Shevchenko
@ 2026-06-03 11:35 ` sashiko-bot
2026-06-04 8:58 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-06-03 11:35 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-media
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] This problem wasn't introduced by this patch, but an unconditional dereference of `client->dev.platform_data` can cause a kernel Oops.
--
commit 1ea3356f8c26d9844c17f495f65f794b5140a6ef
Author: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
media: tda18250: Use %*ph to print small buffer
This commit updates the driver to use the %*ph format specifier for
printing a small buffer as a hex string.
> diff --git a/drivers/media/tuners/tda18250.c b/drivers/media/tuners/tda18250.c
> --- a/drivers/media/tuners/tda18250.c
> +++ b/drivers/media/tuners/tda18250.c
> @@ -804,8 +804,7 @@ static int tda18250_probe(struct i2c_client *client)
[Severity: High]
This is a pre-existing issue, but can an unconditional dereference of
client->dev.platform_data cause a kernel oops?
In tda18250_probe(), cfg is initialized from platform_data and immediately
dereferenced without a prior null check:
static int tda18250_probe(struct i2c_client *client)
{
struct tda18250_config *cfg = client->dev.platform_data;
struct dvb_frontend *fe = cfg->fe;
If the device is instantiated without platform data, such as when a root
user manually creates the device via the i2c new_device sysfs interface or
if bound via an incomplete device tree node, cfg will be null.
Does reading the fe member from a null cfg pointer result in a concrete
null pointer dereference bringing the system down?
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260603111724.230522-1-andriy.shevchenko@linux.intel.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1 1/1] media: tda18250: Use %*ph to print small buffer
2026-06-03 11:35 ` sashiko-bot
@ 2026-06-04 8:58 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2026-06-04 8:58 UTC (permalink / raw)
To: sashiko-reviews; +Cc: linux-media
On Wed, Jun 03, 2026 at 11:35:37AM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
> to consider:
>
> Pre-existing issues:
^^^ Exactly, but thanks!
To the maintainers, I'm not going to address this report even if it's valid.
> - [High] This problem wasn't introduced by this patch, but an unconditional
> dereference of `client->dev.platform_data` can cause a kernel Oops.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-06-04 8:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-03 11:17 [PATCH v1 1/1] media: tda18250: Use %*ph to print small buffer Andy Shevchenko
2026-06-03 11:35 ` sashiko-bot
2026-06-04 8:58 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox