From patchwork Sat Oct 22 07:21:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7299 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1093050wrr; Sat, 22 Oct 2022 00:55:52 -0700 (PDT) X-Google-Smtp-Source: AMsMyM66DOJ66wtOCcadpFPok8SJEVs4hkAyDCPY7b3/Xjn5nyqVs9HM80V+op/LZfHcBu1dPNXW X-Received: by 2002:a63:4e16:0:b0:43f:3554:ff9c with SMTP id c22-20020a634e16000000b0043f3554ff9cmr20068894pgb.578.1666425351953; Sat, 22 Oct 2022 00:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666425351; cv=none; d=google.com; s=arc-20160816; b=hioREivc40qrdkyX8/zVGQfGP4OMhdvAtCw/MaO6KIxwpfAExT3PUXP6j5gD7CwqEb 9nKLi7v6IXlttTyL2MzzjxK7A218z0PwSkOe7Z274pqqlUOBfxyXvBuWgSfXE6XCSHP9 hGRcvAXy5sM4wmLxWx617tq04RBjmuSBJ51AlZ8e9a/aiN9LWVTJ5G7O04yEkZnA1X3l p9gLe/GrG7y7N9npOZKiGssQqFv6FZYsdfsUJivdwwI2wFRmZR7RdUiv48a6PeglSbH/ edboQ+6tJmQ85QOo3dY1cqv500sW2FPMEOTGfovAx2uyMK3sfu/JmoPGTYXw5pjXU4Ps ckhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=1SLUKWCGmB66dYqcLSnFazvp5hUW6/FmhLUOspQSX28=; b=w3lOzAsIE9FKEFoKqC7c56q5/G3K3cV3YT/9f5fPk/0TMWloJ0j+fNe6mMyo5wVPly bc5An2h4eXO81fsRWlJwWoO+lMkWZQvcb97kSP+8OWVHbw3ZhQ08Fc0bxS+PRDaCIH5A NTWAqzrgL/XnmfNKzlAC81z2mBuYSbvhJVBeuPP2Eij2IQeJ+1WfazqzU87G2dHQOqkc 81LKST0mCfuacejdJruMy1J+Yq6M6d7qYmN83gPXNr4eSQ+iqQC+cRW+49C6ZYkSww4v 3ssqP62pYttWrerNMYMIRtQE2vBGOJwXVHjF+DZp7k4xpHm6lzzP8EeWBjICBMRH4Qwl lPeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WdLAHb0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 2-20020a630d42000000b0045a8a6b75fesi27113262pgn.499.2022.10.22.00.55.39; Sat, 22 Oct 2022 00:55:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WdLAHb0x; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231934AbiJVHzV (ORCPT + 99 others); Sat, 22 Oct 2022 03:55:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231754AbiJVHwE (ORCPT ); Sat, 22 Oct 2022 03:52:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E6A612C2AEA; Sat, 22 Oct 2022 00:46:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E268660BA2; Sat, 22 Oct 2022 07:43:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 015B9C433C1; Sat, 22 Oct 2022 07:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666424619; bh=KTZcokemeTem35PNMjBQHPCVWK2pq04hPNhpZ0yUFtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WdLAHb0xQZYfsAoJjnn+P94E+HckkTYwP3kznLgyCFKg/DLsHHCvfWjiTcNT+s43g 7LgnBoSGzPn+jg7cenRdUZZbw4A8F5c4MP49hF0hvytpXR9WkUwW47QDlKolzDC73q ooYgAdAc6R3zPOCEgBrLZKH9jzBIGJtB4hfVutJk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , Matthias Brugger , Mark Brown , Sasha Levin Subject: [PATCH 5.19 214/717] spi: mt7621: Fix an error message in mt7621_spi_probe() Date: Sat, 22 Oct 2022 09:21:33 +0200 Message-Id: <20221022072453.129048558@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747373629606764834?= X-GMAIL-MSGID: =?utf-8?q?1747373629606764834?= From: Christophe JAILLET [ Upstream commit 2b2bf6b7faa9010fae10dc7de76627a3fdb525b3 ] 'status' is known to be 0 at this point. The expected error code is PTR_ERR(clk). Switch to dev_err_probe() in order to display the expected error code (in a human readable way). This also filters -EPROBE_DEFER cases, should it happen. Fixes: 1ab7f2a43558 ("staging: mt7621-spi: add mt7621 support") Signed-off-by: Christophe JAILLET Reviewed-by: Matthias Brugger Link: https://lore.kernel.org/r/928f3fb507d53ba0774df27cea0bbba4b055993b.1661599671.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-mt7621.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/spi/spi-mt7621.c b/drivers/spi/spi-mt7621.c index b4b9b7309b5e..351b0ef52bbc 100644 --- a/drivers/spi/spi-mt7621.c +++ b/drivers/spi/spi-mt7621.c @@ -340,11 +340,9 @@ static int mt7621_spi_probe(struct platform_device *pdev) return PTR_ERR(base); clk = devm_clk_get(&pdev->dev, NULL); - if (IS_ERR(clk)) { - dev_err(&pdev->dev, "unable to get SYS clock, err=%d\n", - status); - return PTR_ERR(clk); - } + if (IS_ERR(clk)) + return dev_err_probe(&pdev->dev, PTR_ERR(clk), + "unable to get SYS clock\n"); status = clk_prepare_enable(clk); if (status)