From: Viresh Kumar Date: Fri, 13 Oct 2023 03:42:19 +0000 (+0530) Subject: OPP: No need to defer probe from _opp_attach_genpd() X-Git-Tag: v6.7-rc1~157^2~3^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ea4911359a534ffe95e7158b4d1c7ccb2f73b17;p=thirdparty%2Fkernel%2Flinux.git OPP: No need to defer probe from _opp_attach_genpd() When the new interface for attaching genpd's via the OPP core was added, it was possible for required_opp_count to be zero, but not anymore. Remove the unused check. Signed-off-by: Viresh Kumar Reviewed-by: Ulf Hansson --- diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 2ceadc3f93ca7..84f345c69ea56 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -2430,14 +2430,6 @@ static int _opp_attach_genpd(struct opp_table *opp_table, struct device *dev, if (opp_table->genpd_virt_devs) return 0; - /* - * If the genpd's OPP table isn't already initialized, parsing of the - * required-opps fail for dev. We should retry this after genpd's OPP - * table is added. - */ - if (!opp_table->required_opp_count) - return -EPROBE_DEFER; - opp_table->genpd_virt_devs = kcalloc(opp_table->required_opp_count, sizeof(*opp_table->genpd_virt_devs), GFP_KERNEL);