gpiolib: remove unneeded assignation
diff mbox

Message ID 1436300535-1230-1-git-send-email-laurent.navet@gmail.com
State New
Headers show

Commit Message

Laurent Navet July 7, 2015, 8:22 p.m. UTC
ret is assigned value from of_property_read_string_index but is
overwritten before being used so remove it.
Also fix coverity CID 1309759

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/gpio/gpiolib-of.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alexandre Courbot July 13, 2015, 2:20 p.m. UTC | #1
On Wed, Jul 8, 2015 at 5:22 AM, Laurent Navet <laurent.navet@gmail.com> wrote:
> ret is assigned value from of_property_read_string_index but is
> overwritten before being used so remove it.
> Also fix coverity CID 1309759

You should probably have a line that says

Reported-by: coverity (CID 1309759)

As other similar patches do.
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Linus Walleij July 16, 2015, 1:51 p.m. UTC | #2
On Tue, Jul 7, 2015 at 10:22 PM, Laurent Navet <laurent.navet@gmail.com> wrote:

> ret is assigned value from of_property_read_string_index but is
> overwritten before being used so remove it.
> Also fix coverity CID 1309759
>
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

Patch applied with Alex' suggested Reported-by tag.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index a6c67c6..346da01 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -365,7 +365,7 @@  static void of_gpiochip_add_pin_range(struct gpio_chip *chip)
 
 		if (pinspec.args[2]) {
 			if (group_names) {
-				ret = of_property_read_string_index(np,
+				of_property_read_string_index(np,
 						group_names_propname,
 						index, &name);
 				if (strlen(name)) {