[PATCH] extcon: Remove redundant 0 value initialization

From: Liao Yuanhong
Date: Mon Aug 18 2025 - 10:27:44 EST


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@xxxxxxxx>
---
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