Commit bd62fa5e authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: arche-apb: devm_regulator_get() doesn't return NULL

And so we don't need to check for it.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7541c1a1
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment