Skip to contentSkip to conversation

HID: corsair-void: Add missing initializer

PATCH In review Kees Bakker 2 participants 4 messages Oct 20, 2024 – Jan 6, 2025 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: corsair-void: Add missing initializer

This was detected by Coverity, CID 1600743

---
 drivers/hid/hid-corsair-void.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-corsair-void.c +1 -1
index 6ece56b850fc..d1fd04264656 100644
@@ -553,7 +553,7 @@ static void corsair_void_battery_remove_work_handler(struct work_struct *work)
 static void corsair_void_battery_add_work_handler(struct work_struct *work)
 {
 	struct corsair_void_drvdata *drvdata;
-	struct power_supply_config psy_cfg;
+	struct power_supply_config psy_cfg = {};
 	struct power_supply *new_supply;
 
 	drvdata = container_of(work, struct corsair_void_drvdata,
Signature · 1 line
2.47.0
#1 lore raw

Good catch, thanks

Are you aware of 'scripts/get_maintainer.pl'? It might tell you to CC Jiri Kosina and Benjamin Tissoires, as they can actually apply this.

Stuart

Quoted 24 lines · Kees Bakker

This was detected by Coverity, CID 1600743

---
 drivers/hid/hid-corsair-void.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-corsair-void.c +1 -2
index 6ece56b850fc..d1fd04264656 100644
@@ -553,7 +553,7 @@ static void corsair_void_battery_remove_work_handler(struct work_struct *work)
 static void corsair_void_battery_add_work_handler(struct work_struct *work)
 {
        struct corsair_void_drvdata *drvdata;
-       struct power_supply_config psy_cfg;
+       struct power_supply_config psy_cfg = {};
        struct power_supply *new_supply;
 
        drvdata = container_of(work, struct corsair_void_drvdata,
--

2.47.0

#2 lore raw

Checked the script, CCed missing people

Stuart

Quoted 33 lines · Stuart

Good catch, thanks

Are you aware of 'scripts/get_maintainer.pl'? It might tell you to CC Jiri Kosina and Benjamin Tissoires, as they can actually apply this.

Stuart

Quoted 24 lines · Kees Bakker

This was detected by Coverity, CID 1600743

---
 drivers/hid/hid-corsair-void.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-corsair-void.c +1 -2
index 6ece56b850fc..d1fd04264656 100644
@@ -553,7 +553,7 @@ static void corsair_void_battery_remove_work_handler(struct work_struct *work)
 static void corsair_void_battery_add_work_handler(struct work_struct *work)
 {
        struct corsair_void_drvdata *drvdata;
-       struct power_supply_config psy_cfg;
+       struct power_supply_config psy_cfg = {};
        struct power_supply *new_supply;
 
        drvdata = container_of(work, struct corsair_void_drvdata,
--

2.47.0

#3 lore raw

Hi, just bumping this since it's been a few months, will it be picked up for 6.13?

Thanks,
Stuart

Quoted 39 lines · Stuart

Checked the script, CCed missing people

Stuart

Quoted 33 lines · Stuart

Good catch, thanks

Are you aware of 'scripts/get_maintainer.pl'? It might tell you to CC Jiri Kosina and Benjamin Tissoires, as they can actually apply this.

Stuart

Quoted 24 lines · Kees Bakker

This was detected by Coverity, CID 1600743

---
 drivers/hid/hid-corsair-void.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/hid-corsair-void.c +1 -2
index 6ece56b850fc..d1fd04264656 100644
@@ -553,7 +553,7 @@ static void corsair_void_battery_remove_work_handler(struct work_struct *work)
 static void corsair_void_battery_add_work_handler(struct work_struct *work)
 {
        struct corsair_void_drvdata *drvdata;
-       struct power_supply_config psy_cfg;
+       struct power_supply_config psy_cfg = {};
        struct power_supply *new_supply;
 
        drvdata = container_of(work, struct corsair_void_drvdata,
--

2.47.0