Skip to content

Commit

Permalink
pinctrl: assume map table entries can't have a NULL ctrl_dev_name field
Browse files Browse the repository at this point in the history
These are already disallowed. Clean up some code that doesn't assume this.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Stephen Warren authored and Linus Walleij committed Feb 22, 2012
1 parent 128a06d commit 9891d98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/pinctrl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,7 @@ static int pinctrl_hog_maps(struct pinctrl_dev *pctldev)

mutex_lock(&pinctrl_maps_mutex);
for_each_maps(maps_node, i, map) {
if (map->ctrl_dev_name &&
!strcmp(map->ctrl_dev_name, devname) &&
if (!strcmp(map->ctrl_dev_name, devname) &&
!strcmp(map->dev_name, devname)) {
/* OK time to hog! */
ret = pinctrl_hog_map(pctldev, map);
Expand Down

0 comments on commit 9891d98

Please sign in to comment.