Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1646245pxy; Mon, 2 Aug 2021 07:01:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8ZyNquaCexv+YtJXDIduJTHUfDYdab48cOCARhkyHwUauEZXAu/0YnAP7UFzfuEk+gtSC X-Received: by 2002:a92:d3d1:: with SMTP id c17mr1280991ilh.86.1627912883395; Mon, 02 Aug 2021 07:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912883; cv=none; d=google.com; s=arc-20160816; b=AXm6x8cMxj5AOg6WvMK80rmnb5tDXXHP/VVQtQYAmekgU8cNWpR415mT56ovJCEcbe ZsNh3seO80G1/zw+Ux2GmiR7xXJpcq03kT+AbtJE027dWvhb6tMtFJVDZoQsvE0MUtKU 352yUx8ikLSitTiVZXK8mxrZ+xLcCO99Nn4Dl+5X6DFBJIeJFwjs3GPHEn3Dsg0I59Oo aKSO2NIeBd1bwhKF5oV/HGFnQhX78ceMXVoh75hXU5aUJg0tBBlKOW4SLD7xU2/SJHk0 HMXkFw0iXvDHEaIdRQyNn0zSVAqAppUJzClrle+k4P1//J25QjEzwVbzZ132nmlZERPy XL+w== 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=rWhnuMC/JiG6zs4nc8nyGqd6i+afEjLggjo6wUn4re0=; b=tzGQIDotEN8Xz7xRZqqEy5N+ke4jnOyrTfRdeC0i/twLHeTNxWKAVeptw+xY9ccWLb 95Fax3U++MI8hhqDTg+PuYAaXguATJ8WEUrUM/2TNDisEH32bA0ZyK/xAtfRvZKU7Qyd VHBsG1jRqlDh7bb0YZ0npYv8fqOsQ6eES+aTfzbnwCMeSfahW2SPSiBO0FatI711jM5t ZlWmmmt9ZDBsRyKZjgCPS2LXMcfICkE0YggfQDR8EKKuKV4HTCLWkxufO2JTfcs4BEXN faTyWEvs0K+Pr4zwtvdXplErPis6Ve9nuxekobzjEFZjcKXZ74Ot/by20c7SekbYah6T eYxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DmcLiOrI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c126si186568iof.49.2021.08.02.07.01.12; Mon, 02 Aug 2021 07:01:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DmcLiOrI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235716AbhHBN6t (ORCPT + 99 others); Mon, 2 Aug 2021 09:58:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:34094 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234825AbhHBNwT (ORCPT ); Mon, 2 Aug 2021 09:52:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 46B2A61103; Mon, 2 Aug 2021 13:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912295; bh=9tJuRX9Qp1ToO185blhtRO+oQzh78cM80OJNjrYgTQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DmcLiOrIyS8eZnC5BktA82rLpzz5fSmotnUWVSmxoF8z66tBy4/vsiWJz1zhN1bDu 0LU6v+KnDJwbABvigYU8arlmI6pwLtQEgdSjTsUBxtoRpfaEEFrQRMj3IA6uuec3eA Fx4Nsol0lNx1Pg2uYwLbR4LsSCrxj02iZx8+2jTE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Marc Kleine-Budde , Sasha Levin Subject: [PATCH 5.4 35/40] can: hi311x: fix a signedness bug in hi3110_cmd() Date: Mon, 2 Aug 2021 15:45:15 +0200 Message-Id: <20210802134336.512272318@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134335.408294521@linuxfoundation.org> References: <20210802134335.408294521@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter [ Upstream commit f6b3c7848e66e9046c8a79a5b88fd03461cc252b ] The hi3110_cmd() is supposed to return zero on success and negative error codes on failure, but it was accidentally declared as a u8 when it needs to be an int type. Fixes: 57e83fb9b746 ("can: hi311x: Add Holt HI-311x CAN driver") Link: https://lore.kernel.org/r/20210729141246.GA1267@kili Signed-off-by: Dan Carpenter Signed-off-by: Marc Kleine-Budde Signed-off-by: Sasha Levin --- drivers/net/can/spi/hi311x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c index 73d48c3b8ded..7d2315c8cacb 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -218,7 +218,7 @@ static int hi3110_spi_trans(struct spi_device *spi, int len) return ret; } -static u8 hi3110_cmd(struct spi_device *spi, u8 command) +static int hi3110_cmd(struct spi_device *spi, u8 command) { struct hi3110_priv *priv = spi_get_drvdata(spi); -- 2.30.2