From patchwork Tue Jun 27 07:12:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 13294052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A5BCEB64D9 for ; Tue, 27 Jun 2023 07:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=aHMNYBzZynQjerLvRJ04OWlhP6+Go7OEBnWNBnru9a4=; b=rCN1KHQDEchoT0 L2BBHXCCFsBHoZYphdXMHCHkiaMWwdg5tmffageYYXYK5FiNFvQwjcdXi8qKADXoCmoec+lI/v48I xGSTaVVMlJAYixl5axf83ELEEtLhtdSwFv/IDttHgmWhYHNBT0dJSR/aGkxWsKuMiWSovdCaOQknN Ss47yZIhcF2u3h1XARN+if/h5628hG9Ltj3jmUs0w9ZY7+jEp3VoJcIAAGkrbLRYMF7Nz5UBETpmd YyDApU1tgcGJ5e4qzll/f4I2GuEOOQCkixYlsZqAPWn/6oam7EqpMGv4pEN1eUMECn49elt13neH+ 78W4pL5bYs9q0Hpduhxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qE2sh-00CHFl-1T; Tue, 27 Jun 2023 07:12:55 +0000 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qE2sY-00CHDr-11 for linux-arm-kernel@lists.infradead.org; Tue, 27 Jun 2023 07:12:47 +0000 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-3fa96fd7a01so22404485e9.1 for ; Tue, 27 Jun 2023 00:12:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687849964; x=1690441964; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=ggLDGiLASKXjzv41vxcGuD0v2D3Md+XuVsA8ytWFhq0=; b=dD4ZR8xlf80OKvytf3PyeqgCLIP4CC6nIl+F8NYd6+cYEP0lEu/52Z6/BbBpzFzQ7m kY79A8AAUUBHKPrTwJEhmZudI6xu/p9bD3xdm+15HsaR2cTMJb5r/F2pHv/dTx7kzlR4 zMHTz/bOflFXKVJm8OFQyuNY/5c50dM4wZhj7FG2mLHEno+033CgjqA8hTiNHnN1DO64 zfri5fOXOpUFe8O0cBSU8yU1iG32UVPh5HkZc4vB0w7kWUAwwQ+gNKWvIZm0Vz0DuMId sWLg5fvMxzRUrvq8jS+dHVivz/ZpZTgBKNrNtkVtTxzM3abYlLkHziG4433gMo9x9q1w dGiw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687849964; x=1690441964; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ggLDGiLASKXjzv41vxcGuD0v2D3Md+XuVsA8ytWFhq0=; b=EZA7cvh7p1qLTCw9+o615ZK70PXPleAzaIIYLytPdPOE0BIYbLpUe3vyd7N2B2JUWV vJfS2qVjgiP83illeL2xVUizlWxTQvlpi/muvqTQu2MZ4FokxwKGkptQDWUsDblH21HA 6GklSeRSA4qLaPp2s0SCElvuxM+qaFwXDqMqbvNX/rv7YPqLu+phAnmQ4AzEPaxCji3L Ssy0yQ77qiwS85h/52+O4QdF/Mn1zrCzVAiTF5hybuNEECatkpHkjB+Mjj82PZZ17gqn Oymno1zr4jEHuqIDB/EqWEFJMkZkSLfKKrhzy/4mXJ8UdzeSQn0Pwlhqq3I3EAugZgg4 nFxg== X-Gm-Message-State: AC+VfDwT40d3wO25AHL3UpS5UYDD8OJdHXX4ok4iER1322NFw51burNk r5PwOctICiywF14qWAvCup2RTg== X-Google-Smtp-Source: ACHHUZ4xx+0rg/Ks+yJHZbTzNzYTWyjpHzcQcOs1x9M64X7tq8jGOULoEd3lGMvz94HJaCLUkFZMUA== X-Received: by 2002:a05:600c:2247:b0:3fb:a266:3a34 with SMTP id a7-20020a05600c224700b003fba2663a34mr897038wmm.12.1687849963890; Tue, 27 Jun 2023 00:12:43 -0700 (PDT) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id q9-20020a056000136900b0030f9c3219aasm9464956wrz.47.2023.06.27.00.12.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jun 2023 00:12:42 -0700 (PDT) Date: Tue, 27 Jun 2023 10:12:36 +0300 From: Dan Carpenter To: Andi Shyti Cc: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Wolfram Sang , linux-i2c@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, kernel-janitors@vger.kernel.org Subject: [PATCH] i2c: sun6i-p2wi: Fix an error message in probe() Message-ID: <98afbc28-3366-459e-bd01-f77cf1a67fe9@moroto.mountain> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230627_001246_349690_656E8BB2 X-CRM114-Status: GOOD ( 13.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The "ret" variable is uninitialized. It was the "p2wi->rstc" variable that was intended. We can also use the %pe string format to print the error code name instead of just the number. Fixes: 75ff8a340a81 ("i2c: sun6i-p2wi: Use devm_clk_get_enabled()") Signed-off-by: Dan Carpenter Reviewed-by: Andi Shyti --- drivers/i2c/busses/i2c-sun6i-p2wi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/i2c/busses/i2c-sun6i-p2wi.c b/drivers/i2c/busses/i2c-sun6i-p2wi.c index ad8270cdbd3e..fa6020dced59 100644 --- a/drivers/i2c/busses/i2c-sun6i-p2wi.c +++ b/drivers/i2c/busses/i2c-sun6i-p2wi.c @@ -250,7 +250,8 @@ static int p2wi_probe(struct platform_device *pdev) p2wi->rstc = devm_reset_control_get_exclusive(dev, NULL); if (IS_ERR(p2wi->rstc)) { - dev_err(dev, "failed to retrieve reset controller: %d\n", ret); + dev_err(dev, "failed to retrieve reset controller: %pe\n", + p2wi->rstc); return PTR_ERR(p2wi->rstc); }