From patchwork Sun May 26 10:31:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lothar Rubusch X-Patchwork-Id: 13674240 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 BF29FC25B7C for ; Sun, 26 May 2024 10:32:39 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From: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=+G7IIdMU4o4LmfeNB0lG8YNHPfHt2Nh5Tp3aYlGqHbw=; b=L2AXfWXi+t1Afu mVsI0yaaCMxZyzfitO525VG+YIuASDNuTXGMN2zShGPVUXTGMODk4a8YNaRGJQ3wyR5VCVD6Q8mCl b41oSN4rW0lyGLsGVDF7qgc0i/jSxCZuItdz61HM/diceM5dNS+SzwHr5VRgrCU6XpGU/xKdfNqcW lWIRTL4HKqCIhk5covUJyc+5O+KdwJd63CRHd/m+kRUrTq1R9f021wNiDIKzU32yD0NfNcHBv1n9P UeWh+gA23aSR6/Ci8ExW4J+q23WQeM9fMgIPVT+xD3RwT81F6ykeEbXhojxc8wJzLNEZpAoleKvvq lAHdWDq3hdaFxHnQBBvg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBBB0-0000000CZEK-1lRE; Sun, 26 May 2024 10:32:30 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sBBAw-0000000CZD3-31Yc for linux-arm-kernel@lists.infradead.org; Sun, 26 May 2024 10:32:28 +0000 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-42011507a54so25873085e9.0 for ; Sun, 26 May 2024 03:32:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716719540; x=1717324340; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=qHGSRtBgYEwf5XeC+NvJ0ZSO87WeoCCUBD7D/Iu4rNY=; b=BUkGVBS5Xxn23NojgFYU/eqWZOzRtlvgR37VnOyHsOrQKb82dOVax1usgmE200/E8o I3LrsdxJbRbJJqfjTMyXvsuJP2vbsbCdfro1DcOr8WZ+fKCOrHsGYobTtCzGUThlWDJc ATxV2RMOlUU/tHBZ5Nt/0iUoiInxl0n6/Qsy1ud3Cl594EE7npWPHdqZneAWe6NU8Loj KrV8uN7Nau3aAxyPkQ3/86sH0CjBFFYGItZ3JsCzevV8MG9SzEx9pak5r6fNSVYmMhTH vYETEwKj5U4fGGKXxwDl4sxXhs3q6sqciTSJhpJlGs9EYTdwO/AZmnS6b2/qE27MMFoY qSGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716719540; x=1717324340; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=qHGSRtBgYEwf5XeC+NvJ0ZSO87WeoCCUBD7D/Iu4rNY=; b=oSOc8nkRw3nIIolALAlAOjqcbBhJEyMGzE/PkdM28XFxXkGjTwUbnv74Hhgb/vJ6lG 6UdpOKlZuVBp07BxettmblDA04ztu3bJ6ww6odNMalHgCPPPfy9y89il07XeNHWkum39 7BqmY3xsaSi4hZ6rSEN8VvBUHwf/XfJyOJYk+WA+TLaWtI0Nl2udbll/qpXnm9Dp2SKR tWap+sXf2YUHu6zrDFdXHMlKy/G3Vh0/TlyCcXVAJnNnfkOicwZh86R7HziCYRIJUpph MbxsgxATiQdu5QG+/K2HXBNRax9aaBTxHL5C7nVOTR9zX7jq4JNEBMl4r1RlaBMupAt5 Dy3w== X-Forwarded-Encrypted: i=1; AJvYcCWogy40EZ2fCsC8t6FLqnjTGYTWWRnbiUwBlpzXfO2DFXg7KpZ4kqNEY8joMt/YbBLxUBXurKTAUX5K0cfEb35vhk9ZUyNseebGbOcB/hPs1Qg97B4= X-Gm-Message-State: AOJu0YzYaligqj1/faDZi7CIpdlL5waUyI9T0qDZp4HQ87IS7xEYjOcQ YRNsR0wK/hxq1UzsUcBjI4X/s2K26PCDaVdddCuPUAuzR1AIsR39 X-Google-Smtp-Source: AGHT+IH1/zyQQAW2UnztwvjH4KyCVYCCt/wjYrQb76m6DkbN6LiKHaAMA5t5MhdTV9ctjn9Kheh06A== X-Received: by 2002:a05:600c:4449:b0:41b:f4e1:381b with SMTP id 5b1f17b1804b1-421015a60b9mr93206105e9.2.1716719540014; Sun, 26 May 2024 03:32:20 -0700 (PDT) Received: from 4728cded2e8d.v.cablecom.net (84-72-156-211.dclient.hispeed.ch. [84.72.156.211]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42100fad638sm106565865e9.29.2024.05.26.03.32.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 03:32:19 -0700 (PDT) From: Lothar Rubusch To: herbert@gondor.apana.org.au, davem@davemloft.net Subject: [PATCH] crypto: atmel-sha204a - fix negated return value Date: Sun, 26 May 2024 10:31:28 +0000 Message-Id: <20240526103128.14703-1-l.rubusch@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240526_033226_790530_C3444441 X-CRM114-Status: GOOD ( 11.48 ) 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: , Cc: dan.carpenter@linaro.org, alexandre.belloni@bootlin.com, linux-kernel@vger.kernel.org, claudiu.beznea@tuxon.dev, l.rubusch@gmail.com, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Fix negated variable return value. Fixes: e05ce444e9e5 ("crypto: atmel-sha204a - add reading from otp zone") Reported-by: Dan Carpenter Closes: https://lore.kernel.org/linux-crypto/34cd4179-090e-479d-b459-8d0d35dd327d@moroto.mountain/ Signed-off-by: Lothar Rubusch Reviewed-by: Dan Carpenter --- drivers/crypto/atmel-sha204a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/atmel-sha204a.c b/drivers/crypto/atmel-sha204a.c index 24ffdf505023..2034f6031518 100644 --- a/drivers/crypto/atmel-sha204a.c +++ b/drivers/crypto/atmel-sha204a.c @@ -106,7 +106,7 @@ static int atmel_sha204a_otp_read(struct i2c_client *client, u16 addr, u8 *otp) if (cmd.data[0] == 0xff) { dev_err(&client->dev, "failed, device not ready\n"); - return -ret; + return -EINVAL; } memcpy(otp, cmd.data+1, 4);