All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: imu: adis: fix uninitialized symbol warning
@ 2025-03-04  6:05 sunliming
  2025-03-04  6:36 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: sunliming @ 2025-03-04  6:05 UTC (permalink / raw)
  To: lars, Michael.Hennerich, nuno.sa, jic23
  Cc: linux-iio, linux-kernel, sunliming, kernel test robot,
	Dan Carpenter

From: sunliming <sunliming@kylinos.cn>

Fix below kernel warning:
smatch warnings:
drivers/iio/imu/adis.c:319 __adis_check_status() error: uninitialized symbol 'status_16'.

Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: sunliming <sunliming@kylinos.cn>
---
 drivers/iio/imu/adis.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/imu/adis.c b/drivers/iio/imu/adis.c
index 1c646c36aeb1..0ea072a4c966 100644
--- a/drivers/iio/imu/adis.c
+++ b/drivers/iio/imu/adis.c
@@ -306,7 +306,7 @@ int __adis_check_status(struct adis *adis)
 {
 	unsigned int status;
 	int diag_stat_bits;
-	u16 status_16;
+	u16 status_16 = 0;
 	int ret;
 	int i;
 
-- 
2.25.1


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

end of thread, other threads:[~2025-03-04 14:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-04  6:05 [PATCH] iio: imu: adis: fix uninitialized symbol warning sunliming
2025-03-04  6:36 ` Dan Carpenter
2025-03-04 14:15   ` Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.