diff --git a/drivers/opp/of.c b/drivers/opp/of.c index 30cc407c8f93..ba3069450815 100644 --- a/drivers/opp/of.c +++ b/drivers/opp/of.c @@ -639,7 +639,7 @@ static struct dev_pm_opp *_opp_add_static_v2(struct opp_table *opp_table, free_opp: _opp_free(new_opp); - return ERR_PTR(ret); + return ret ? ERR_PTR(ret) : NULL; } /* Initializes OPP tables based on new bindings */