summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/radio-si476x.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-09-23 17:21:07 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-09-27 10:47:23 +0200
commitfd6627cb82d5e991dedbd972a219311eabe89884 (patch)
tree4363c5ab02c4ac3a669fa01aa49f31e5cbfce8ba /drivers/media/radio/radio-si476x.c
parentmedia: verisilicon: replace snprintf with strscpy+strlcat (diff)
downloadlinux-fd6627cb82d5e991dedbd972a219311eabe89884.tar.xz
linux-fd6627cb82d5e991dedbd972a219311eabe89884.zip
media: radio-si476x: don't fill in bus_info
Let the V4L2 core fill in bus_info. This fixes this warning: drivers/media/radio/radio-si476x.c: In function 'si476x_radio_querycap': drivers/media/radio/radio-si476x.c:333:28: warning: '%s' directive output may be truncated writing up to 35 bytes into a region of size 23 [-Wformat-truncation=] 333 | "platform:%s", radio->v4l2dev.name); | ^~ drivers/media/radio/radio-si476x.c:332:9: note: 'snprintf' output between 10 and 45 bytes into a destination of size 32 332 | snprintf(capability->bus_info, sizeof(capability->bus_info), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 333 | "platform:%s", radio->v4l2dev.name); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/radio/radio-si476x.c')
-rw-r--r--drivers/media/radio/radio-si476x.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c
index 6061506159f1..b2c5809a8bc7 100644
--- a/drivers/media/radio/radio-si476x.c
+++ b/drivers/media/radio/radio-si476x.c
@@ -328,9 +328,7 @@ static int si476x_radio_querycap(struct file *file, void *priv,
strscpy(capability->driver, radio->v4l2dev.name,
sizeof(capability->driver));
- strscpy(capability->card, DRIVER_CARD, sizeof(capability->card));
- snprintf(capability->bus_info, sizeof(capability->bus_info),
- "platform:%s", radio->v4l2dev.name);
+ strscpy(capability->card, DRIVER_CARD, sizeof(capability->card));
return 0;
}