[PATCH v3 2/7] gpio: rtd1625: Drop unneeded initializations

Yu-Chun Lin <[email protected]>
Newsgroups org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Drop unneeded assignments. While at it, place correctly the comment to be
just above the referenced code.

Link: https://lore.kernel.org/lkml/[email protected]/
Suggested-by: Andy Shevchenko <[email protected]>
Signed-off-by: Yu-Chun Lin <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.