pinctrl: assume map table entries can't have a NULL ctrl_dev_name field

These are already disallowed. Clean up some code that doesn't assume this.

Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This commit is contained in:
Stephen Warren 2012-02-19 23:45:50 -07:00 • committed by Linus Walleij
commit 9891d98c7a

View file

@ -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);