From patchwork Tue Apr 27 17:51:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Quinlan X-Patchwork-Id: 12227091 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=-13.7 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 3E65FC433B4 for ; Tue, 27 Apr 2021 17:54:09 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA7D960FDB for ; Tue, 27 Apr 2021 17:54:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA7D960FDB Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wkafC8+zEKSbSil+EC1whGSWjTG3vWEF7fxkmEl+SHc=; b=oWE5L2qBriPPq6k17PnsfYi4sw 3tp5dqKrrDQF3efQ+YkL32T8WCheeFnIc509mpRfYdpdUkJ+5X9cK9Ro7LTUohvXyv80lB5+W40CD GnOt/kiI9sxlZaytkBNnAJHVWERY04Tn71qmqBUUWq8GxshAYnSz7CviJf+Px/8n7IExd69rCooU4 YTkJaWgFxb7RHwCSQU7k+Y0I/LlsWwYupB/8bmUI7gxsy4igu4MCswITEBh4mzOoy9KnqDq5/216T inWkIo9NUAcmYbxbZhEBTe/23pcLmSKC1ar63oFnir1GD2iGGrKLMAhZZpCkjS2LASEqZ0emE5SqY lXT8VgTQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lbRsZ-001zS4-Lg; Tue, 27 Apr 2021 17:52:11 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbRsJ-001zQF-Cq; Tue, 27 Apr 2021 17:51:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=7XSm6/qzn9duNJgtAGMhBBSTeeaC2tU96ijTiVyfrw0=; b=sPqLXbkv4T1fGAYce7/7yfZgfa WOKoBq/DDhtMDK6R7DCpcXt/yNcDbgl7+iv9AmJZN7nt3LV+ZEaCDRJt9RUEts340u6vwig9HzZRq NSOpEs2zXeFMwOnpSmNUibXL69jpz5gOyXyedzOU2WJTiWfGmpDt7ClYzo2U1HDCWzYblPxEDokr5 MfKmVcZeQ+Cikx3FesNlrUYGjPtiZO+TC1fPwC1XQl0NeQYxHiJ+rmjiQFZmTdGJvrUo3rhVdIZSR yBNZJ3vZ+ar/xhawanPCwglsB4gMP/yeWHQwIvlFtZTNFac/pAWIQDEwUoHLa5ufhAA5Hg0vnlMl8 poQo5RLw==; Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lbRsE-00Gtke-SJ; Tue, 27 Apr 2021 17:51:52 +0000 Received: by mail-pj1-x1032.google.com with SMTP id l10-20020a17090a850ab0290155b06f6267so1449776pjn.5; Tue, 27 Apr 2021 10:51:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=7XSm6/qzn9duNJgtAGMhBBSTeeaC2tU96ijTiVyfrw0=; b=ORiN/zPxZxhdaqsrIGlBT/ur3WfsLynWgmFPyXBf4D0Bm2D0t1Coryt9rFPBawWXNv X5hp3Ki0fH75da95sE5A/Fe1DZBMEGTWpTrQU6+BGFVujzcoYjHAwjncxp2B8kfZwz9t Ml0tnEqbzAacbRF+flA+YIlbJ6T8hFfea+n4T9KOenJZVmprB2yFehvwtOEfxlQGXm9n X3MkwWBjvRzbytfcS0M8thcVtrkM/kD8/Pp3YCBSJWtGUYAPTiqzKI/fiRvRLEX+32g3 aw9+h+0Q7nQpRjvFi9OAnMsL7hohfAIQuejxsoZqGg+STUagRiRC6lMcaElpBZ7Iettb +KHw== 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:in-reply-to :references; bh=7XSm6/qzn9duNJgtAGMhBBSTeeaC2tU96ijTiVyfrw0=; b=MaT1PDBD7meC7mq3SOAu1/uDongqqNVYHX7CjdgodNs1u37EhEgJzjRUB0ZjM6dXwh haG6WDJ279u0Q+BdtiunbIsPmhsxK38fyzmurghcTCUO6LwuAdcUhClNbmbNGdKE2r4Z lVSqqBxGF6gE66HwofmteuhaoBVMtM0phgRXPAWiyL/Ok6BzuC+lxRKBlM7yiYLQECkz 3T7bAPQxEK4MfAPXVn5pUNLYzCLCqGJqsK9Hgt21EeXG+uHhcpSpbT0uluBkB4VevwRL hZOtLq9MnCDV5ErIyOTLjmuu9+cRe3ch0n6va/wdwv/fUkOnSzhtSH42qNoTJao4KWuE I/6Q== X-Gm-Message-State: AOAM533heLIjeYDR+YD6PsFcEjhQFJeg2VpEteIBqziBr4uVswcGWOAl tdrxjP3FrpYPiJARmpIkyf0= X-Google-Smtp-Source: ABdhPJyT7HZQNUAXFGxWL8hWisHDSfUuIwmbKZqKOedQH2FPNEW8cz8HwMCds+JC8D7s+KhXGY4TOA== X-Received: by 2002:a17:90a:f195:: with SMTP id bv21mr6241676pjb.56.1619545909205; Tue, 27 Apr 2021 10:51:49 -0700 (PDT) Received: from stbsrv-and-01.and.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id h21sm2456833pfo.211.2021.04.27.10.51.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Apr 2021 10:51:48 -0700 (PDT) From: Jim Quinlan To: linux-pci@vger.kernel.org, Bjorn Helgaas , Nicolas Saenz Julienne , bcm-kernel-feedback-list@broadcom.com, james.quinlan@broadcom.com Cc: Jim Quinlan , Nicolas Saenz Julienne , Lorenzo Pieralisi , Rob Herring , Florian Fainelli , Jim Quinlan , linux-rpi-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-arm-kernel@lists.infradead.org (moderated list:BROADCOM BCM2711/BCM2835 ARM ARCHITECTURE), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v1 1/4] PCI: brcmstb: Check return value of clk_prepare_enable() Date: Tue, 27 Apr 2021 13:51:36 -0400 Message-Id: <20210427175140.17800-2-jim2101024@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210427175140.17800-1-jim2101024@gmail.com> References: <20210427175140.17800-1-jim2101024@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210427_105150_939518_4100AFD0 X-CRM114-Status: GOOD ( 11.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Check for failure of clk_prepare_enable() on device resume. Signed-off-by: Jim Quinlan Acked-by: Florian Fainelli Fixes: 8195b7417018 ("PCI: brcmstb: Add suspend and resume pm_ops") --- drivers/pci/controller/pcie-brcmstb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index e330e6811f0b..4ce1f3a60574 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1161,7 +1161,9 @@ static int brcm_pcie_resume(struct device *dev) int ret; base = pcie->base; - clk_prepare_enable(pcie->clk); + ret = clk_prepare_enable(pcie->clk); + if (ret) + return ret; ret = brcm_phy_start(pcie); if (ret)