Skip to content

Commit

Permalink
pinctrl: remove minor dead code
Browse files Browse the repository at this point in the history
This removes a test whether the 'desc' variable is NULL.
This possibility has already been eliminated by the
below test earlier in the loop:

                if (desc == NULL) {
                        dev_warn(pctldev->dev,
                                 "could not get pin desc for pin %d\n",
                                 pins[i]);
                        continue;
                }

Found with Coverity: CID #1090078

Signed-off-by: Michael Opdenacker <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
Michael Opdenacker authored and linusw committed Nov 4, 2013
1 parent a3183c6 commit 808e657
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/pinctrl/pinmux.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,16 +505,14 @@ void pinmux_disable_setting(struct pinctrl_setting const *setting)
pin_free(pctldev, pins[i], NULL);
} else {
const char *gname;
const char *pname;

pname = desc ? desc->name : "non-existing";
gname = pctlops->get_group_name(pctldev,
setting->data.mux.group);
dev_warn(pctldev->dev,
"not freeing pin %d (%s) as part of "
"deactivating group %s - it is already "
"used for some other setting",
pins[i], pname, gname);
pins[i], desc->name, gname);
}
}

Expand Down

0 comments on commit 808e657

Please sign in to comment.