diff options
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r-- | drivers/pinctrl/core.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c index fb7f3bebdc69..dc5c126e398a 100644 --- a/drivers/pinctrl/core.c +++ b/drivers/pinctrl/core.c | |||
@@ -657,11 +657,7 @@ static struct pinctrl *pinctrl_get_locked(struct device *dev) | |||
657 | if (p != NULL) | 657 | if (p != NULL) |
658 | return ERR_PTR(-EBUSY); | 658 | return ERR_PTR(-EBUSY); |
659 | 659 | ||
660 | p = create_pinctrl(dev); | 660 | return create_pinctrl(dev); |
661 | if (IS_ERR(p)) | ||
662 | return p; | ||
663 | |||
664 | return p; | ||
665 | } | 661 | } |
666 | 662 | ||
667 | /** | 663 | /** |
@@ -738,11 +734,8 @@ static struct pinctrl_state *pinctrl_lookup_state_locked(struct pinctrl *p, | |||
738 | dev_dbg(p->dev, "using pinctrl dummy state (%s)\n", | 734 | dev_dbg(p->dev, "using pinctrl dummy state (%s)\n", |
739 | name); | 735 | name); |
740 | state = create_state(p, name); | 736 | state = create_state(p, name); |
741 | if (IS_ERR(state)) | 737 | } else |
742 | return state; | 738 | state = ERR_PTR(-ENODEV); |
743 | } else { | ||
744 | return ERR_PTR(-ENODEV); | ||
745 | } | ||
746 | } | 739 | } |
747 | 740 | ||
748 | return state; | 741 | return state; |