Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1487369lqb; Sun, 26 May 2024 03:32:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXSXWpvw1LdbKmgVmcAdjFQ6abU8Niw6ZlNK/bTQsEKw0Tf6acuA1lGPTwryGH2qFtSDdTVu30hfJILkBQXZdweLbznCxjDBvdBFFD7Ew== X-Google-Smtp-Source: AGHT+IEwbzh2jaSaJR5nn4A/RN1Wu0womNtLwo73qt4a6CqXzLaRPto0UmXRYdxDH5qCpHVPmrKr X-Received: by 2002:a50:930a:0:b0:572:a7c8:f12b with SMTP id 4fb4d7f45d1cf-57850ec26e0mr6368181a12.13.1716719550412; Sun, 26 May 2024 03:32:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716719550; cv=pass; d=google.com; s=arc-20160816; b=XFhyoCUBTb0Cz5DAt3kOzxlpLeyl54bGomswhIksECSydoNJANExAmgw2v6LLrVE/o UVX+biZB5Dtyxu1leffQhC2IwAEINiZ9Ea5tMaNB9bz639L3TqxQ8Hx0N24uER8gTJjI Hm/UuYnII0MdJhiibCR6In6R6E0DfCvleQCGOZzdaIpd/b5Th7JUPkWaQjM5DAYJ3n1N fswoAMghsgU+2EIVq1zAx/6Q1KPB7k/+Izbl5BhYvPl+YWG13g0VSS20qDZkWF9AZ+x2 HZbCbQHnpE97p5H98RXGzb9ETwvnNfem3J8UqaMi/GE4PXJ6jlYQTgrkHCeY5TK92QSj oeug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=qHGSRtBgYEwf5XeC+NvJ0ZSO87WeoCCUBD7D/Iu4rNY=; fh=gbLkzGFV2CfDmPFKNxms/MH2qfiEcNAT/5p9LdkC79M=; b=aRs+UJ14GpBlTkLnJiLgdZJlS3tUVzF15rIQFmqC51iluYfI+6XD8sOP+eG8p7y4g7 rIpoPfswUEZZTHkZ1TE13LuoJOieqDb2CaatH+9aW0uPL93xD6le65Gbs3mXSvIRUEM3 TYJR/pmTBonWVOFcLKhErp8R7HA+KoaWpycxv5whr8zClShRobpX6C5aj9Huq+J4Jk6g wjmo5X81PRbpOeEdKABYzDS/CN25Cw+zGKlxLT0xxEfu/RVrBKvAbeSUme16JKZuJBEZ ipo8NiSCRvUD0stbtaQ7FQNpxtjHQqbP+zxKIcvkuVffTmzfg3/fwE9AnH6gYP7a2KM+ FlXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gnXk24sW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-crypto+bounces-4404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5785234bc74si2944295a12.33.2024.05.26.03.32.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 May 2024 03:32:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto+bounces-4404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gnXk24sW; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-crypto+bounces-4404-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-crypto+bounces-4404-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1A3A61F21C5B for ; Sun, 26 May 2024 10:32:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3B1D946C; Sun, 26 May 2024 10:32:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="gnXk24sW" X-Original-To: linux-crypto@vger.kernel.org Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 048912CA2; Sun, 26 May 2024 10:32:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716719543; cv=none; b=EwWN8YUQqFsuRuaAdv9NuG52dzTvoqcnvICi/zHZhVXrGenYr8DMlj+dtNzTnyxSsHZmpTmpCEGaJScnyzECDbWyQ7NjNXAuED2akI4RwDgpCOotpgEzfU5qMEFICRebo7X57JvigqwR5Hs9T0WU6bALAMKXeYTLWonT9GuPsbE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716719543; c=relaxed/simple; bh=cM+3m9Vlx+Li31AKKrxvOFnkw6WwfSo8Tpsy25CvwDM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=pyPwI97XTB5aB+6ScWmz9T7GT1rfQfQWd8hmEt2wdVtPHyw9haZgY7fJoDlncMtn19ro4jwelmUmFT4W9wqiz51NZKYlkP+UfQsGbBmZF0xfKHiQLg8nYOv+PDfUYP5u8oHw72pWOEbICdhQLyR/yYXvWkMn6wVU8BUVgJO0KdE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=gnXk24sW; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-42108822e3cso11278895e9.0; 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=vger.kernel.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=gnXk24sW1XT2Uj81K/iZ1ZEJne7faC7Ca5l6srSru1g8H7M7+ZwgXxtnKqU4hbNSqj zDF1TqrfvNOePEZhYT9aBDFzGDF6hUu1PrnAT7nM6FMC3e7+Bz/Mns3J//N0+Dx/IoVg HevzBT+p3cu8pW3bbF7ftGpIOpICXmyHYZDpKaAkR0cvAzhuj/RTRdg+1Ct5GsxGtr8K stIYcP34DOA2qUrsol2LgPJCEUxc57KvcxqA5F6sXgOP3I2WRchCO52uWf+r3/w4zEI+ 6jcATQCysroyrPGbR350Touu2PqVWrmYwGUlrYZ9zcdyVL7eGWtsZVSkANXyrDHWur5w 8rhA== 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=btVzTPBt0mv0asvAaylm3Td/4ZE7zDOKbGtBzco5CTqo5Trxr5vb4aZQMsRfzI/ya+ My10Zgygbk4xTqhqzYdjfNK8SJQAkUctQTZ+yvGO9MQDsMUjZIt5QVhrWs1vk9urQgPV bmpeTpXxPLLanEs0X+U1cvLVe5vKsCxPX40RqiQLBpZ1GwiK7PfJ2I/a7es5hjAaEk3x X0SpTAd6EBnnTqHvriAL+LenkFbBnOoi7c11Q9//ws0/BYnuXnpk+WRh4EQiAmjMV+wG dVtbJJ5F4RwWPB68oPl+k9XpuEU+rNg1PJR9bTdURyXGCWd8qhdIKx1aLvKQ6YsyFQj7 +Brw== X-Forwarded-Encrypted: i=1; AJvYcCXsiAFZwmczcZ4jB1/NQ5iNxbHl7lu6EFbC3QLsUIPxp9ynslmE3r1Uyb+YgW7I61kyVPkxcLr1WhiSKpI2fEoCzGiTwFbNBrK6I5ZojjNy2yqlRfMHUwyxytP+w8z2FhUjDXd8vyv+9mLz X-Gm-Message-State: AOJu0Yyi0nDps2SSU+AUCsMz1DuI9gsPocbOpnR/Yryl64z7Te6nYY+J KLYUA/a1NYELxBq6WXgx3lWlOGqLpMy5IBgiXO+MPjzgqpe8l8yb 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 Cc: dan.carpenter@linaro.org, nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com, claudiu.beznea@tuxon.dev, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, l.rubusch@gmail.com 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 Precedence: bulk X-Mailing-List: linux-crypto@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- 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); -- 2.39.2