[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250818140204.4762-1-liaoyuanhong@vivo.com>
Date: Mon, 18 Aug 2025 22:02:04 +0800
From: Liao Yuanhong <liaoyuanhong@...o.com>
To: MyungJoo Ham <myungjoo.ham@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
linux-kernel@...r.kernel.org (open list:EXTERNAL CONNECTOR SUBSYSTEM (EXTCON))
Cc: Liao Yuanhong <liaoyuanhong@...o.com>
Subject: [PATCH] extcon: Remove redundant 0 value initialization
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@...o.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
Powered by blists - more mailing lists