[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240410-smatch-v1-2-785d009a852b@chromium.org>
Date: Wed, 10 Apr 2024 21:54:39 +0000
From: Ricardo Ribalda <ribalda@...omium.org>
To: Mauro Carvalho Chehab <mchehab@...nel.org>,
Yasunari Takiguchi <Yasunari.Takiguchi@...y.com>,
Jean-Christophe Trotin <jean-christophe.trotin@...s.st.com>,
Lars-Peter Clausen <lars@...afoo.de>,
Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: Hans Verkuil <hverkuil-cisco@...all.nl>, linux-media@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-input@...r.kernel.org,
Ricardo Ribalda <ribalda@...omium.org>
Subject: [PATCH 2/6] media: cxd2880: Replaze kmalloc with kzalloc
Fix smatch error:
drivers/media/spi/cxd2880-spi.c:391 cxd2880_start_feed() warn: Please consider using kzalloc instead of kmalloc
Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
---
drivers/media/spi/cxd2880-spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/spi/cxd2880-spi.c b/drivers/media/spi/cxd2880-spi.c
index 6be4e5528879f..65fa7f857fcaf 100644
--- a/drivers/media/spi/cxd2880-spi.c
+++ b/drivers/media/spi/cxd2880-spi.c
@@ -388,7 +388,7 @@ static int cxd2880_start_feed(struct dvb_demux_feed *feed)
if (dvb_spi->feed_count == 0) {
dvb_spi->ts_buf =
- kmalloc(MAX_TRANS_PKT * 188,
+ kzalloc(MAX_TRANS_PKT * 188,
GFP_KERNEL | GFP_DMA);
if (!dvb_spi->ts_buf) {
pr_err("ts buffer allocate failed\n");
--
2.44.0.478.gd926399ef9-goog
Powered by blists - more mailing lists