mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
pinctrl: core: Remove unnecessary test for desc->name
The implementation in pinctrl_register_one_pin() ensures pindesc->name is always not NULL before insert the pindesc to radix tree. If the desc return from pin_desc_get is not NULL, desc->name is always not NULL. Signed-off-by: Axel Lin <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
parent
e2b86b8481
commit
6c325f874c
1 changed files with 1 additions and 3 deletions
|
|
@ -153,9 +153,7 @@ int pin_get_from_name(struct pinctrl_dev *pctldev, const char *name)
|
|||
pin = pctldev->desc->pins[i].number;
|
||||
desc = pin_desc_get(pctldev, pin);
|
||||
/* Pin space may be sparse */
|
||||
if (desc == NULL)
|
||||
continue;
|
||||
if (desc->name && !strcmp(name, desc->name))
|
||||
if (desc && !strcmp(name, desc->name))
|
||||
return pin;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue