mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] accel/qaic: silence some uninitialized variable warnings
@ 2023-05-03 10:41 Dan Carpenter
  2023-05-10 14:57 ` Jeffrey Hugo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dan Carpenter @ 2023-05-03 10:41 UTC (permalink / raw)
  To: Jeffrey Hugo
  Cc: Oded Gabbay, linux-arm-msm, dri-devel, linux-kernel, kernel-janitors

Smatch complains that these are not initialized if get_cntl_version()
fails but we still print them in the debug message.  Not the end of
the world, but true enough.  Let's just initialize them to a dummy value
to make the checker happy.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/accel/qaic/qaic_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/accel/qaic/qaic_drv.c b/drivers/accel/qaic/qaic_drv.c
index ff80eb571729..e10e8b603e37 100644
--- a/drivers/accel/qaic/qaic_drv.c
+++ b/drivers/accel/qaic/qaic_drv.c
@@ -263,7 +263,7 @@ static void qaic_destroy_drm_device(struct qaic_device *qdev, s32 partition_id)
 static int qaic_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
 {
 	struct qaic_device *qdev;
-	u16 major, minor;
+	u16 major = -1, minor = -1;
 	int ret;
 
 	/*
-- 
2.39.2


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-05-16 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03 10:41 [PATCH] accel/qaic: silence some uninitialized variable warnings Dan Carpenter
2023-05-10 14:57 ` Jeffrey Hugo
2023-05-10 16:48   ` Dan Carpenter
2023-05-16 19:24     ` Jeffrey Hugo
2023-05-11 15:34 ` Carl Vanderlip
2023-05-11 19:46 ` Pranjal Ramajor Asha Kanojiya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®