From patchwork Mon Oct 24 11:28:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 9682 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp535623wru; Mon, 24 Oct 2022 09:13:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5uYcuhAG+9ApKq/z2dJcpgV5sfXJITYalI0wyBOJzfb1IM6r8sv/5LnKKzF5cXX2sz+AKU X-Received: by 2002:a17:903:124e:b0:179:da2f:244e with SMTP id u14-20020a170903124e00b00179da2f244emr34332413plh.169.1666627996602; Mon, 24 Oct 2022 09:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666627996; cv=none; d=google.com; s=arc-20160816; b=VQj+A6jy0j3Z/gtNLXPofxGv461TADceYlw51vzFJTZyEhxlaOb/bv+R7WQxCRgpzv vYlvXugrpb/I+BDbmNY0qgq5pt/D43K3U1qVPfNuKt8AEWriE+VXJ26muEGzXBWAp6PK b/5YZPo5tAZ3CbMbABVOsnWqzPFTXuCk7sBQLO/AEQ4VJSvZjEZedEwr3krYidtlqmSF lHJ/5F93qAXNpGnLP8T30D/RbuGxNu6ej5CiWx4eoJsBUoSfHzF6NGt5SKZD1rU0DsEM QQZzZOgNNgPpEAUAScIJHUKn+9Qfvz65ozufkzEMzmqQOsbHgUJnWw2GY01fu9BuSlFO 32bg== 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=ba2iqV/ee9WPtbXg7Cyl2bjxN1Ai52EvTDEtSjbVwwo91JaeUIWVYhenuOU9/dx6zR aQe2lHCzrfDdbwrrLytu+hb4cqY01LfDc/GxElrRX/pW09IrECj3Gp084FFLl+ZqaNa/ jZPKJcAWBS2bIAFuc+rrkRQEgqBNKk2x8aRAqFR/NqGs2Rcx9lA325H+z+i/vjeIoJJ/ fGVDtWHVzXC8YfjqStlh45vap6Fesv3nYVVZ2QDc6HMQbRLU5xsz5U3JbCYqQ6r5B0Lm HeySA27eGnaS0iA9amy+WMz8xHuHz+izWB8TsFVdCimfwuV9kK5ZJJVbDE7fpyW3cLxS Pb4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=RIweRbOU; 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 f7-20020a17090ace0700b00212cae10683si8181367pju.69.2022.10.24.09.13.03; Mon, 24 Oct 2022 09:13:16 -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=RIweRbOU; 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 S233628AbiJXQMj (ORCPT + 99 others); Mon, 24 Oct 2022 12:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233050AbiJXQGK (ORCPT ); Mon, 24 Oct 2022 12:06:10 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3CB5F3337B; Mon, 24 Oct 2022 07:58:05 -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 ams.source.kernel.org (Postfix) with ESMTPS id 3EE20B8165B; Mon, 24 Oct 2022 12:20:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DFDCC433C1; Mon, 24 Oct 2022 12:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666614027; bh=KTZcokemeTem35PNMjBQHPCVWK2pq04hPNhpZ0yUFtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RIweRbOUdJCd3qfpQYoQRTHd9cuYtQiVXnEtZMVyO3cJsAD7XGuKxLAv0R6Roj9Zj Q0IJNmQxhqOiLwEwmEADnF9P5SNLIyoL6TN95s0dE8aNe3LjbNHLVX2gFy6gEZapWf PBeMjPJJlJ2kmvi5CMpOQJq0VKVtOk3s+2XGnz4k= 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.10 104/390] spi: mt7621: Fix an error message in mt7621_spi_probe() Date: Mon, 24 Oct 2022 13:28:21 +0200 Message-Id: <20221024113027.110321621@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024113022.510008560@linuxfoundation.org> References: <20221024113022.510008560@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.6 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?1747586117851930647?= X-GMAIL-MSGID: =?utf-8?q?1747586117851930647?= 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)