Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp1642524pxy; Mon, 2 Aug 2021 06:56:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxH7vcP5ZYaXZv1asEqcWzENWBLdLewObo5DpYIZRUCGCuCQhuv4v/39z+EtGBb58yFQG1C X-Received: by 2002:a92:cc4a:: with SMTP id t10mr15130ilq.286.1627912586545; Mon, 02 Aug 2021 06:56:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627912586; cv=none; d=google.com; s=arc-20160816; b=Y0Qc9/oVRlYwD+MCB5MVUawwZzDcvO5brhEyZlSdphEh/GF3tl0b/MK0MuvbtlDEml EstH1pnXKuc4o9w060TupxrBMmUk6YIxieQf1tDrbeLrRLS57IiUC2BIiQs1+Gb1zHdl A1sY6k7Li4iy8n0/hOQg6WlTCKe6CxG03ac46cBIqBqjR5BJgAGitqi52Mrq+iW6ItAm t4SV2oAcqmey3caUcOtP/GPSTKwQLFjNY0DOMFKwKrTTWXYX0wSkCtfCu40Kg+qgJbIm qtOiQIl5FST3CCHL6wrP5uzgYGl8/ApxVTr3YHMnJxKFYD0/09KQ+7mXCSzUGBeB9rTf 3XCw== 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=gcq6lmiqH4nJ1EelxKKKxX0gnyB66GrsLDWKD5DAgTLE3oiYgv9a/VXR0fYJVPTKHl 18NQZWRJFnDtELUQsyAocuW070UY+/8LRxy/eN5fHlkcfYqezkLPzZaHnI8+D342YS0v lLcOneGXJ2O0u/Kd7uBT5o0+XzmKgcCZY7NmUn0XyRDrA6/MBKnA6PEeZWy5TUvt0xpQ iR7K5douT3xDTWeQzfffN5iBKvRN3JafEyB0LMms/M6tfdQ3bwd78+WBRQnH1PO93hY/ wgGJwLxJyYRxr/D5Mb1uB0XZsWioiktOGHiiHsdH/RJt12V0TxQTFZt/zQNyjFmSW4wH Uuhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=KgpuufXN; 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 b39si11691334jav.0.2021.08.02.06.56.14; Mon, 02 Aug 2021 06:56:26 -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=KgpuufXN; 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 S235318AbhHBNz0 (ORCPT + 99 others); Mon, 2 Aug 2021 09:55:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:34014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234833AbhHBNuS (ORCPT ); Mon, 2 Aug 2021 09:50:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 254EB61057; Mon, 2 Aug 2021 13:50:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627912208; bh=Oo+qsc4/7ji7Qm2PiW+BLBGjaNcR4eM7qYHqGZrvnco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KgpuufXN/1PYG0ZSkiktRXCUuuzTFs/9Z7+VvuItZIuX2FvlJlXI9MKs40PkodfQV iCW8qbzifKvOCaEWS3GL/O/3PMXVGUUemnPBRgZJs0HVBdqg7FIablZ9NqUxiLX6mG qY2YHI7cA7TphO3zFXbeChL2D9bLxM/IskPQBo18= 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.19 27/30] can: hi311x: fix a signedness bug in hi3110_cmd() Date: Mon, 2 Aug 2021 15:45:05 +0200 Message-Id: <20210802134334.959958210@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210802134334.081433902@linuxfoundation.org> References: <20210802134334.081433902@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