Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1187204rwi; Wed, 19 Oct 2022 07:40:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5x/0vgXmb4CKBV/2KXRstQNiJH6dEpQYe6YFXC9hEIWFwkDy/I+oTSIp03DELU01JNlW4Y X-Received: by 2002:a17:906:eec9:b0:73d:c369:690f with SMTP id wu9-20020a170906eec900b0073dc369690fmr7108173ejb.767.1666190427195; Wed, 19 Oct 2022 07:40:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666190427; cv=none; d=google.com; s=arc-20160816; b=F2T+YUcapATL3gaBzDZ1xpTXTQRBN4jQ2v6phgUbHmOD3zDRcKODoFRrWKBR/bR31F SzC/GZJoj84TeG/J7+6cNYQIz7bMx22u016Luga7Y4YQr+ErwxJPKj98L/wOMnx7j3DJ DYBQw0k2AqGmz3fE5QySHVVGPSO7rOMeApUfhFYvF2dMsGu+bxTIu4Mf0sBZV6CBRhuf NC8UckN2pzyQWP9DCdhDFKw1X+fjGeLop5vZFP8yfd9v6VQOs7oU21PCsymUDAePazHA 58r2VAvxXVKHT32ftsMHwp1dZpNzRfVnVKb/jphP7JstxL3fTnab+Xm9Q+89mZ7e7S0Q 1PmQ== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u19-20020a17090617d300b00711da52c6e4si12884991eje.309.2022.10.19.07.40.02; Wed, 19 Oct 2022 07:40:27 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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) -- 2.35.1