[PATCH v3 2/7] gpio: rtd1625: Drop unneeded initializations
From: Yu-Chun Lin
Date: Sun Aug 16 2026 - 11:20:42 EST
Drop unneeded assignments. While at it, place correctly the comment to be
just above the referenced code.
Link: https://lore.kernel.org/lkml/anUcSPcJjJkLh0Z-@ashevche-desk.local/
Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Signed-off-by: Yu-Chun Lin <eleanor.lin@xxxxxxxxxxx>
---
drivers/gpio/gpio-rtd1625.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-rtd1625.c b/drivers/gpio/gpio-rtd1625.c
index 469d4e94e4c7..910004c423df 100644
--- a/drivers/gpio/gpio-rtd1625.c
+++ b/drivers/gpio/gpio-rtd1625.c
@@ -107,10 +107,10 @@ static int rtd1625_reg_mask_xlate(struct gpio_regmap *gpio, enum gpio_regmap_ope
unsigned int base, unsigned int offset, unsigned int *reg,
unsigned int *mask)
{
- /* Each GPIO has its own dedicated 32-bit register */
struct rtd1625_gpio *data = gpio_regmap_get_drvdata(gpio);
- int val = 0, ret = 0;
+ /* Each GPIO has its own dedicated 32-bit register */
*reg = base + offset * 4;
+ int val, ret;
switch (op) {
case GPIO_REGMAP_SET_OP:
--
2.50.1