diff options
author | Michael Opdenacker <michael.opdenacker@free-electrons.com> | 2013-10-29 07:50:45 +0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-11-04 16:07:05 +0400 |
commit | 808e657c5c709844074d47a4284c746070b0772c (patch) | |
tree | 3d7c6f0c3b2fd353b104ddbba7c4cedc49c8f803 /drivers/pinctrl/pinmux.c | |
parent | a3183c60e3e9be7abd830ebed904491625e07d2e (diff) | |
download | linux-808e657c5c709844074d47a4284c746070b0772c.tar.xz |
pinctrl: remove minor dead code
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 <michael.opdenacker@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r-- | drivers/pinctrl/pinmux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c index 9d144a263dc2..9248ce4efed4 100644 --- a/drivers/pinctrl/pinmux.c +++ b/drivers/pinctrl/pinmux.c @@ -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); } } |