From patchwork Mon Oct 24 11:29:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 8888 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp433648wru; Mon, 24 Oct 2022 05:50:06 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7uFlEOWHD3K9WkWpuC71lipBxJ8WVC78fqcskSE7hBDDHYxTAPEg5Yun0gaKsLJaUyhOUC X-Received: by 2002:a17:907:2e01:b0:78d:f24b:7330 with SMTP id ig1-20020a1709072e0100b0078df24b7330mr27072311ejc.604.1666615806339; Mon, 24 Oct 2022 05:50:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666615806; cv=none; d=google.com; s=arc-20160816; b=RAuuP3AbSA6z7Lg8PWuN995FN3/DwSMuW3OQd9cDscIWyLcJbXbkHqh7T4Ahi7lyRM 1LujJ9pyORjycasF4jyqmc2LiyJzEEMxKkFlOQS90Qq7zwCFuaU2FqUiSOtMymW4GaZM WnsIy+Y09Mo24KdNy8IUlyThcEQNvaFgDo22T1IhBfu5ROi0QxKla2amaz/1BF0XvyYV IsttsOnseqtbt4BQDamgFy6e7PNaNdLBGZdxxuswgZBzKniMOw0OpTVlVMiEfFRgCg+8 7xfDuDvFYJ0GF2njDbVagXsqROppw06p4Hg0t9lwGYcolQh30kKNCVp016Quhdjg7Jsi 6nYw== 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=l/Tfg7KbD+6wEL0iyDMk9UVQk6X39Y4YbL2BaHhBCa4=; b=GJgJH/J+QZWLkMSkUlc+YbTgKmTCnBjddyxnTGa7hO4DEiW9OcD+67M8mxDyhr7uzW CMmUlOJ3w4WJh0CPMDoiT/WjzqBf00xrzy5VbeHmtcQTTrNwn3WmT+nVyMAePzAgNPUG 8fBcGxUYcEZj5mbUsTO2oZ3FtQRqYFUMp5e/hEVqfR6eoU51xpGJ/iPLUvJ6440KbvpL XtUKxjI7iszTaLilwF/CijuZxXV+cc0jmQ8LWrFDN16wkm/hqC/eszkuDdT+fZzRbk5h 4YE3miXxHwWq6MfEDbX7wodyreWNsVPvRsKUxsGIU5xqPRpUvtlYwb7DA4xER+SIf7Qn CQUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="L/HhGeQR"; 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 m15-20020a056402430f00b0043d54ba0a4dsi33530349edc.327.2022.10.24.05.49.42; Mon, 24 Oct 2022 05:50:06 -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="L/HhGeQR"; 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 S234362AbiJXMs0 (ORCPT + 99 others); Mon, 24 Oct 2022 08:48:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234284AbiJXMoH (ORCPT ); Mon, 24 Oct 2022 08:44:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA03A7EFCF; Mon, 24 Oct 2022 05:09: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 dfw.source.kernel.org (Postfix) with ESMTPS id 0373461259; Mon, 24 Oct 2022 11:57:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 191F8C433D6; Mon, 24 Oct 2022 11:57:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666612669; bh=brYtHU42pdCzx+EVdOKsAMZy1gp+KJ7GwY6PpsFheis=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=L/HhGeQR/5Lajsc4pQjxpeM4uCE5eGpzWpMpIdmDYUKy69M5Rn1+LgLVNyywu1j5u r8iWWd4nS5kjF4YirfFi/Rs4flqFaUgYZVVvoHDW6LV/LkH4MbqgY1dqt65/eP5+Zd bjojZ3pK8Kkk3EoxgeZcB/SlQFOE72PLvzSGdi8o= 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 4.19 074/229] spi: mt7621: Fix an error message in mt7621_spi_probe() Date: Mon, 24 Oct 2022 13:29:53 +0200 Message-Id: <20221024113001.469797349@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221024112959.085534368@linuxfoundation.org> References: <20221024112959.085534368@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?1747573335876956520?= X-GMAIL-MSGID: =?utf-8?q?1747573335876956520?= 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/staging/mt7621-spi/spi-mt7621.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/staging/mt7621-spi/spi-mt7621.c b/drivers/staging/mt7621-spi/spi-mt7621.c index 75ed48f60c8c..b73823830e3a 100644 --- a/drivers/staging/mt7621-spi/spi-mt7621.c +++ b/drivers/staging/mt7621-spi/spi-mt7621.c @@ -442,11 +442,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)