pinctrl: assume map table entries can't have a NULL ctrl_dev_name field
authorStephen Warren <swarren@nvidia.com>
Mon, 20 Feb 2012 06:45:50 +0000 (23:45 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 22 Feb 2012 16:59:33 +0000 (17:59 +0100)
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>
drivers/pinctrl/core.c

index b6e3c35c028e6768b35c3d52eb02c56e5713a650..552d8c115c4f898f49c40052cb012a5c21936b5f 100644 (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);