Skip to content

Commit

Permalink
pinctrl: sx150x: Unregister the pinctrl on release
Browse files Browse the repository at this point in the history
There is no matching call to pinctrl_unregister, so switch to the
managed devm_pinctrl_register to clean up properly when done.

Cc: [email protected]
Fixes: 9e80f90 ("pinctrl: Add SX150X GPIO Extender Pinctrl Driver")
Signed-off-by: Peter Rosin <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
peda-r authored and linusw committed Jan 18, 2018
1 parent 119fcf4 commit 0657cb5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-sx150x.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ static int sx150x_probe(struct i2c_client *client,
pctl->pinctrl_desc.npins = pctl->data->npins;
pctl->pinctrl_desc.owner = THIS_MODULE;

pctl->pctldev = pinctrl_register(&pctl->pinctrl_desc, dev, pctl);
pctl->pctldev = devm_pinctrl_register(dev, &pctl->pinctrl_desc, pctl);
if (IS_ERR(pctl->pctldev)) {
dev_err(dev, "Failed to register pinctrl device\n");
return PTR_ERR(pctl->pctldev);
Expand Down

0 comments on commit 0657cb5

Please sign in to comment.