From patchwork Tue Oct 20 10:33:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 286760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A4EC43457 for ; Tue, 20 Oct 2020 10:33:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C6670222E8 for ; Tue, 20 Oct 2020 10:33:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uCzsmEeW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389314AbgJTKd0 (ORCPT ); Tue, 20 Oct 2020 06:33:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59962 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733094AbgJTKdZ (ORCPT ); Tue, 20 Oct 2020 06:33:25 -0400 Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DD08C0613CE for ; Tue, 20 Oct 2020 03:33:23 -0700 (PDT) Received: by mail-pl1-x644.google.com with SMTP id o9so795492plx.10 for ; Tue, 20 Oct 2020 03:33:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0AuLkrHmDKwQ7qOPWrn9vSIKIU6u8iuaT4gQA+tnIAI=; b=uCzsmEeWXFIaM7DITCIh/gB9nnxs0qfIVziUqw/n1AT64os7ZK8VUMUKUgLYJgNU1y 15ergUR0FUKLoDuEHQuuwj+l2A5EsyhAU+Uy0K9Dglg3gGPiCU+GCtQCKGH7pGnceGDr MNixKd1tdq+DiJX11xvZwHuI4SytXDmWxktjuTiVEcl4seySsshTL4AdoBunlHu2ZHS5 6yxAXTXkm6Y9pvdE0s1o05o4OjWoBhpIL5/w5ZpAUGPidFaGD/tON5PxBU+Y+Eb+j2zK fMe1wVBKz2L31a4MrVfk3mOsM5s3O8NJSzk/PIb9xXJfr6NNm/PdlItLAwd91u1f5Cen uwTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0AuLkrHmDKwQ7qOPWrn9vSIKIU6u8iuaT4gQA+tnIAI=; b=Fb76iP+gaQB5EczsZcPBd2iTFFT/+gejKo9Fvd5Xkcola9RJJvCguOIoe5xOQgPzoN EXamlSzJZ5a5bL+gVPJgd+6cN9uN+c/g2FOig3bz4zS149kBO2Y2z4iPA3uVrnmzlYM7 rIgEJEpbZiDv3tVQjIa/NHIu9HlM2EZfNlYVPtAcjzu1rhYF2ALf0CoRhFuQW6Bp17A3 Cez1vjhLnVj7CXNPbdapckL9KsuTQve6kR9A6TygWvtBpJVpwAzwD8fypsKhyDuK3IQX H5ckngPAz32XVepqyarIVzvbBDoeKzaFJZPkMjHkdBnsA4Zw5EGqYpphMeq99CJtSeBX +VKw== X-Gm-Message-State: AOAM532C333SEBeNoyLqS/3YQGZotxufmxWEJgiNV39zkEXu2A055ANu 6MdnhlmYvYjxsc73A2vSXbAnow== X-Google-Smtp-Source: ABdhPJxHK138V7xdthbOM/r50ZwxEuEj74h4Lzz/gR3nYuyED/sZUGnftpJWsS5S79icVa1ZtiR+5Q== X-Received: by 2002:a17:90a:f198:: with SMTP id bv24mr2204169pjb.230.1603190002895; Tue, 20 Oct 2020 03:33:22 -0700 (PDT) Received: from localhost ([122.181.54.133]) by smtp.gmail.com with ESMTPSA id h5sm1888227pfh.9.2020.10.20.03.33.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Oct 2020 03:33:22 -0700 (PDT) From: Viresh Kumar To: Rafael Wysocki , Viresh Kumar , Nishanth Menon , Stephen Boyd , Ulf Hansson , Stephan Gerhold , Krzysztof Kozlowski Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Naresh Kamboju , linux-kernel@vger.kernel.org Subject: [PATCH] opp: Fix early exit from dev_pm_opp_register_set_opp_helper() Date: Tue, 20 Oct 2020 16:03:15 +0530 Message-Id: X-Mailer: git-send-email 2.25.0.rc1.19.g042ed3e048af MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org We returned earlier by mistake even when there were no failures. Fix it. Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER") Reported-by: Naresh Kamboju Signed-off-by: Viresh Kumar Tested-by: Naresh Kamboju --- Rafael: Please pick up this one as well for 5.10-rc1/2 once Naresh gives his tested by. Thanks. drivers/opp/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index 2483e765318a..4ac4e7ce6b8b 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -1930,7 +1930,7 @@ struct opp_table *dev_pm_opp_register_set_opp_helper(struct device *dev, return ERR_PTR(-EINVAL); opp_table = dev_pm_opp_get_opp_table(dev); - if (!IS_ERR(opp_table)) + if (IS_ERR(opp_table)) return opp_table; /* This should be called before OPPs are initialized */