Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[firefly-linux-kernel-4.4.55.git] / drivers / pinctrl / pinctrl-adi2.c
index 55f3d68419a60948d1de1f297e486bac63914ae7..c3c3d2345fc6b23b4364d952e75d8887772f7221 100644 (file)
@@ -703,6 +703,7 @@ static struct pinmux_ops adi_pinmux_ops = {
        .get_function_name = adi_pinmux_get_func_name,
        .get_function_groups = adi_pinmux_get_groups,
        .gpio_request_enable = adi_pinmux_request_gpio,
+       .strict = true,
 };
 
 
@@ -1069,9 +1070,9 @@ static int adi_pinctrl_probe(struct platform_device *pdev)
 
        /* Now register the pin controller and all pins it handles */
        pinctrl->pctl = pinctrl_register(&adi_pinmux_desc, &pdev->dev, pinctrl);
-       if (!pinctrl->pctl) {
+       if (IS_ERR(pinctrl->pctl)) {
                dev_err(&pdev->dev, "could not register pinctrl ADI2 driver\n");
-               return -EINVAL;
+               return PTR_ERR(pinctrl->pctl);
        }
 
        platform_set_drvdata(pdev, pinctrl);