* [PATCH] extcon: Remove redundant 0 value initialization
@ 2025-08-18 14:02 Liao Yuanhong
2025-08-18 19:07 ` Markus Elfring
0 siblings, 1 reply; 2+ messages in thread
From: Liao Yuanhong @ 2025-08-18 14:02 UTC (permalink / raw)
To: MyungJoo Ham, Chanwoo Choi,
open list:EXTERNAL CONNECTOR SUBSYSTEM (EXTCON)
Cc: Liao Yuanhong
The extcon_dev struct is already zeroed by kzalloc(). It's redundant to
initialize edev->max_supported to 0.
Signed-off-by: Liao Yuanhong <liaoyuanhong@vivo.com>
---
drivers/extcon/extcon.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
index e7f55c021e56..e6b10dcdb3cb 100644
--- a/drivers/extcon/extcon.c
+++ b/drivers/extcon/extcon.c
@@ -1064,7 +1064,6 @@ struct extcon_dev *extcon_dev_allocate(const unsigned int *supported_cable)
if (!edev)
return ERR_PTR(-ENOMEM);
- edev->max_supported = 0;
edev->supported_cable = supported_cable;
return edev;
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-18 19:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-18 14:02 [PATCH] extcon: Remove redundant 0 value initialization Liao Yuanhong
2025-08-18 19:07 ` Markus Elfring
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®