greybus: arche-apb: devm_regulator_get() doesn't return NULL
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 11 Jan 2016 05:59:11 +0000 (11:29 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 11 Jan 2016 23:58:01 +0000 (15:58 -0800)
And so we don't need to check for it.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/arche-apb-ctrl.c

index b06bb3453ca4d4c101e201e836d56e2e94a4cc93..1ae2c06c8e332916bb91482a7e2f3d31a9a717c2 100644 (file)
@@ -246,13 +246,13 @@ static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
 
        /* Regulators are optional, as we may have fixed supply coming in */
        apb->vcore = devm_regulator_get(dev, "vcore");
-       if (IS_ERR_OR_NULL(apb->vcore)) {
+       if (IS_ERR(apb->vcore)) {
                dev_info(dev, "no core regulator found\n");
                apb->vcore = NULL;
        }
 
        apb->vio = devm_regulator_get(dev, "vio");
-       if (IS_ERR_OR_NULL(apb->vio)) {
+       if (IS_ERR(apb->vio)) {
                dev_info(dev, "no IO regulator found\n");
                apb->vio = NULL;
        }