Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp525466pxa; Thu, 27 Aug 2020 08:36:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjtgPb0gSZ7gXDMqESQuDUjOYXAZZLGAObYHKiHkGMy1tipBRh5ryJlQBdu+lOXY5oaRY4 X-Received: by 2002:a17:906:656:: with SMTP id t22mr12355374ejb.392.1598542613893; Thu, 27 Aug 2020 08:36:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598542613; cv=none; d=google.com; s=arc-20160816; b=hLWCDoJWs94QuWudB1AWTXscLcu44InbBfHMUBaWPOLSADKVEVFvR/npoXCmC1jZrm leAO5Ep8mINWt/JSV2v1aKzcBHJj7yGCEPh9MgCn8Y3+g5wRbZcUeN1tTAgWEaBwj6Mw x7vPQoUd+NRO/JVpLIQwv91Lii27Ag163//2qjrkk79KaWyUhMUWzGPVvNCrnKeBHqVs 9zRMq0QFhJQoShMc6D+j7IAYmma/rRrTw7k9lDaUsOeUZNe3jQhey6l3MeQ9wH79ugnW cX4hXEercNhdhQPgvaA2Ft9mBMji23Mya95MBynK6uPjh1sGb6ZDqH0ty9qUd5ZK/uqS 3ekg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=CLogCY9snthkks89Ea8CnKQB+BmwpQEsk4ur1DM2HdU=; b=GNVdyu7mYvBZtoT8T2d9kTWfqpnk0jp18dfHTuVT7UfDUde90GZ+dRwRRhE/hp2iCk CzsK1/It5mnSR6lC/N+6I6rmrcj+hBei84GO1LwdmjSgdviONFtMtbn98mQdc7pVUfQ3 48AypToEPmUge2Bso8hQuGWoDlckR5t4MVhxAADhNSZupUtuhcYCHE3b3FsSXVLzkCde 10xy6Aew4KDwiFoY9NJC6kkSnFia0vMSGhwmhxj/tiWlawPv6manGZKz/r53qGgWddE1 tP7eQJRDDtimfV02rlQBSmr/SqxZ5kZegE/OUmzLO9bTZV2Pnb0X1hMvcL+vNhfJrnIU tvRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BkSNnJtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si1626352ejr.369.2020.08.27.08.36.30; Thu, 27 Aug 2020 08:36:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=BkSNnJtZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbgH0Pdm (ORCPT + 99 others); Thu, 27 Aug 2020 11:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727827AbgH0Pdl (ORCPT ); Thu, 27 Aug 2020 11:33:41 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB561C061233 for ; Thu, 27 Aug 2020 08:33:40 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id o13so3640308pgf.0 for ; Thu, 27 Aug 2020 08:33:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=CLogCY9snthkks89Ea8CnKQB+BmwpQEsk4ur1DM2HdU=; b=BkSNnJtZWr1nebAVtZFleChfEIZX1Ul2Ahd6LQna22QOuwjvS4znFuCi9Rk5uCwoAo wsweWskmO00ZS9A+jlYlaoiiuhf1RG6P3uYkNM+xWSd6b++ZfHGc5fkClqFv1mH8aEUK nlb5HA7p159z1jRabNuNV/qxS6WRAP55aadI8= 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=CLogCY9snthkks89Ea8CnKQB+BmwpQEsk4ur1DM2HdU=; b=Au1V0uuahXhtgEf2DKwhb/Njh9lsOPehhOJc5QrrFD1Fnuao8HWDjZWTDqsA6824X5 2AWn7fQ+J9MkmxB3um8KqhsnympX5OcWMjR4GxezTvuxEMRS79p8hcAM5bUSEQiTjNdf 7ULJUglXNMCUNIWfrqD4K6AdxLshRem/TE6rbvaYmsfhp77/lzCvRLpJL/jgxWLIKEk7 e0/p1tjOiAMsgU7Ly9osVEiV1v33+GjYibtfHXjHw1mbJMGk3h5XhaV9BooCD58oTmwN qTmAR1KLgU9Oy20ObnT9xfJX0jZczjrrw/iFJAe/gAgZ465ZGAM659PtcZY51LiaFZXd 5y0Q== X-Gm-Message-State: AOAM532E76a03Z7CKgyELxASpeEJUOtiP/trURr18Oz5MztqjHZM1e/p XCP2akj/OsLzvpVqo1kQVKDxTQ== X-Received: by 2002:a65:52c5:: with SMTP id z5mr15387187pgp.105.1598542419246; Thu, 27 Aug 2020 08:33:39 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:1:42b0:34ff:fe3d:58e6]) by smtp.gmail.com with ESMTPSA id y7sm3192105pfm.68.2020.08.27.08.33.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Aug 2020 08:33:38 -0700 (PDT) From: Douglas Anderson To: Ulf Hansson Cc: arnd@arndb.de, naresh.kamboju@linaro.org, vbadigan@codeaurora.org, rnayak@codeaurora.org, Douglas Anderson , Adrian Hunter , Andy Gross , Bjorn Andersson , Viresh Kumar , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org Subject: [PATCH] mmc: sdhci-msm: When dev_pm_opp_of_add_table() returns 0 it's not an error Date: Thu, 27 Aug 2020 08:33:34 -0700 Message-Id: <20200827083330.1.I669bb4dc3d92bd04e9a695f97904797dc8241b79@changeid> X-Mailer: git-send-email 2.28.0.297.g1956fa8f8d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()") works fine in the case where there is no OPP table. However, if there is an OPP table then dev_pm_opp_of_add_table() will return 0. Since 0 != -ENODEV then the "if (ret != -ENODEV)" will evaluate to true and we'll fall into the error case. Oops. Let's fix this. Fixes: d05a7238fe1c ("mmc: sdhci-msm: Unconditionally call dev_pm_opp_of_remove_table()") Signed-off-by: Douglas Anderson --- drivers/mmc/host/sdhci-msm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index b7e47107a31a..55101dba42bd 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -2284,7 +2284,7 @@ static int sdhci_msm_probe(struct platform_device *pdev) /* OPP table is optional */ ret = dev_pm_opp_of_add_table(&pdev->dev); - if (ret != -ENODEV) { + if (ret && ret != -ENODEV) { dev_err(&pdev->dev, "Invalid OPP table in Device tree\n"); goto opp_cleanup; } -- 2.28.0.297.g1956fa8f8d-goog