From patchwork Wed Oct 19 08:25:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5559 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp350008wrs; Wed, 19 Oct 2022 07:12:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4pa+BXD1F4VzBw5BSV6y+/ELNo69O9Zml2YO7sJR3PxpB5ALnkoF8BQMO4zt1D86ATWoHc X-Received: by 2002:aa7:9250:0:b0:563:723f:7914 with SMTP id 16-20020aa79250000000b00563723f7914mr8411840pfp.12.1666188771238; Wed, 19 Oct 2022 07:12:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666188771; cv=none; d=google.com; s=arc-20160816; b=uXsyYxRb3IGLJE4YscHCtHQNhyXXJTSnzgmsDmc63cdwiBAz2RgVlF+a+Mbp4tFrhs 2ZkUuN+SqYrp85U0ujXglZAwcxYaFLg2kVJjyRd6xbiRw5EE32cXokbsAmMH7nZBXYW5 mHGntinX0RKT9/Y8G5jSEoqJ4XFrPFUe6rx07FMgDnB7Wpc0hEDXXR5r+45lDAOKdzqQ u52ikKQZr7x0DGwgLFMdqQHtEZ8vV3JkvWRAt5uzPyXpaVteBmRMl0LlohlfXV1ol4iY gcOTpn3X0/dEtgQ9B3V+aHM5vuw6xORc9mgdJKIzET+axagkusMA2FoO3q9/WnHBLQU6 5v6A== 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=gASJz6Nd1ikCWqK+0I77P/X39NLIaiJZ5zknRbHs27y8MvpNXQp+b2vdh40RGQF0RE ZEbPwDPpM35yLsLmA2rXPl5zN0aY6dBZqu24zi4BjDexu4UBz0tUHZ3lxbm0fNTmn2q0 lgaBX/gKf2T3+c5kokJkUL6K/d3XXgeMDr8P4AwIGmqivRFIzd55ctZd2BFNvjvbmHya OiWcfB9mG2TDMyIoLbEYZU3dB2ezMbArpnCoNPd92GQhfLqU6wx6QsvacL7kFr+C6QtV qatRViTSu45QNGCgWFBNGaqzbDzF9teAMREJFaK385EJUNsvOTp756tD5pwUsyfoyva/ 3Vjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HtOzV3QA; 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 e6-20020a63aa06000000b00439286e51a2si17315800pgf.155.2022.10.19.07.12.20; Wed, 19 Oct 2022 07:12: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=HtOzV3QA; 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 S233796AbiJSN6L (ORCPT + 99 others); Wed, 19 Oct 2022 09:58:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234006AbiJSNyf (ORCPT ); Wed, 19 Oct 2022 09:54:35 -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 0095114BB55; Wed, 19 Oct 2022 06:37: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 04BACB8231E; Wed, 19 Oct 2022 08:49:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63D28C433C1; Wed, 19 Oct 2022 08:49:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666169365; bh=KTZcokemeTem35PNMjBQHPCVWK2pq04hPNhpZ0yUFtw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HtOzV3QA+lcYTwM2ipTPNtmk5+sJtJ9PhpTI3kI2QLhbvXuEjvDCo5A1ugPVbzxHF khFgyIpSD+Nq5wwCH1RyiZb8eFvm4mvfOqHpJv/I54aYt2kxQMrh8tYj3gOxXE8jRT a1WGDl5y2YK4p3btJm+vqxqowUvlD4/RHqXY0OUQ= 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 6.0 249/862] spi: mt7621: Fix an error message in mt7621_spi_probe() Date: Wed, 19 Oct 2022 10:25:36 +0200 Message-Id: <20221019083301.037688171@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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?1747125556566941738?= X-GMAIL-MSGID: =?utf-8?q?1747125556566941738?= 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)