Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1641868pxy; Mon, 2 Aug 2021 06:55:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMliNft8Tp5IM0EcOJUHYLSNlNhtdtXbcAh6IAxzmTBBg59as7VNRvPC1bNW2JRynzOZxZ X-Received: by 2002:a92:d783:: with SMTP id d3mr1366595iln.193.1627912528345; Mon, 02 Aug 2021 06:55:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912528; cv=none; d=google.com; s=arc-20160816; b=Z3OAEVSS1QHCIYtNPFZ9gZYyStP4anqW+BwnJhcOb1SdTT8a3zYn76N5Ac1anWJDp+ 1Tti5k04UXVhdgumyPjb00eZdfSDV9rb6lnF+sj71AmozsKu693XNU/ThZLI2xrN9PlI lchVOfa79CjVFz/qS0l/IHZS8Fmmig4qStXNQr5uHdJ2kAuYYPUpVSzu9n7/qk4vI+Pe YCaLG06S+CHT45oELQd6WKMFOV0r2EbjjkxfYfa0UL2SmfuoXlCBrRFTStOpP9no+Yjd zmG3r8dNvj4HZkRjdszm3YKadlHtqawTwXkD4kKr8BvhavirRWIWs1eXQpjNRmt+vI0m 4AyQ== 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=5nmlzDtOVzFQZ27B1Lmm153c86dsehWIndjF8XXoOAQ=; b=kNgUJ0sUJmlvmciFwJbsrkkERP+3WCV2ZkacNLPm+gbSKB4SyAlxrQIaiAsxll1SPZ VMNXGy7Zj2074Sje9wJNjRQgxy6SXd+LDX1yWrdLVpWT3+qyQNCNpvmnVZVWbTD3GRHV BdUZzVdxoVAxG/hex9WNa0ngKsZFcTdhq+kU5NWuOrq48BQGGsDqn99fIqDh8hjHxHCa FprsX6jRKd3qfTEu+kHHzpRjwI5jdZoitbYTQcYOJpmr/5uvIfbGhj4KAGoWg5365uDT Jsq7Zrdy7GIDA9qyQwWS2W/FWJ23D71E5JdlqgHxSXyqdXlwHdNxC+Xw314dUyxzuFC+ 7B+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sKjwmF98; 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 m38si5652970jav.99.2021.08.02.06.55.17; Mon, 02 Aug 2021 06:55:28 -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=sKjwmF98; 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 S235240AbhHBNx6 (ORCPT + 99 others); Mon, 2 Aug 2021 09:53:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:60854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234248AbhHBNtd (ORCPT ); Mon, 2 Aug 2021 09:49:33 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9BEE560FC1; Mon, 2 Aug 2021 13:49:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912163; bh=Oo+qsc4/7ji7Qm2PiW+BLBGjaNcR4eM7qYHqGZrvnco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sKjwmF98Hog7T9YyaGCXgDebngBDBG2+MFtedeooUmFi3KylQ5YCa4QlrXguhOsj7 uDy9rBqWJrMoiSgAxj8zg6PLePiJZLLRHgANOcH1Keu6XOb/M6GIzZy5v7Io2wzicT C+ZT2AipF6dUWqkvPWWk8rcfjXMpmm45V+i4uQh8= 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 4.14 37/38] can: hi311x: fix a signedness bug in hi3110_cmd() Date: Mon, 2 Aug 2021 15:44:59 +0200 Message-Id: <20210802134335.998730665@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.835358048@linuxfoundation.org> References: <20210802134334.835358048@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 ddaf46239e39..472175e37055 100644 --- a/drivers/net/can/spi/hi311x.c +++ b/drivers/net/can/spi/hi311x.c @@ -236,7 +236,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