[PATCH 2/7] hwmon: f71882fg: Use zero-initialization instead of memset()
From: Manish Baing
Date: Sat May 30 2026 - 18:15:04 EST
Use empty brace initialization (={}) instead of explicit memset()
to zero-initialize stack memory to simplify the code.
No functional change.
Signed-off-by: Manish Baing <manishbaing2789@xxxxxxxxx>
---
drivers/hwmon/f71882fg.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hwmon/f71882fg.c b/drivers/hwmon/f71882fg.c
index 204059d2de6c..c1d02d4e7b76 100644
--- a/drivers/hwmon/f71882fg.c
+++ b/drivers/hwmon/f71882fg.c
@@ -2667,9 +2667,7 @@ static int __init f71882fg_init(void)
{
int err;
int address;
- struct f71882fg_sio_data sio_data;
-
- memset(&sio_data, 0, sizeof(sio_data));
+ struct f71882fg_sio_data sio_data = { };
address = f71882fg_find(0x2e, &sio_data);
if (address < 0)
--
2.43.0