Return-Path: Received: from mail-co1nam03on0138.outbound.protection.outlook.com ([104.47.40.138]:57624 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752205AbeCCWYL (ORCPT ); Sat, 3 Mar 2018 17:24:11 -0500 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Dan Carpenter , Eric Anholt , Sasha Levin Subject: [PATCH AUTOSEL for 4.15 001/102] drm/panel: rpi-touchscreen: propagate errors in rpi_touchscreen_i2c_read() Date: Sat, 3 Mar 2018 22:24:08 +0000 Message-ID: <20180303222318.26006-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org List-ID: From: Dan Carpenter [ Upstream commit 85b4587f8e94143bafb8b6a4003a5187b9a8753d ] There is one caller which checks whether rpi_touchscreen_i2c_read() returns negative error codes. Currently it can't because negative error codes are truncated to u8, but that's easy to fix if we change the type to int. Fixes: 2f733d6194bd ("drm/panel: Add support for the Raspberry Pi 7" Touchs= creen.") Signed-off-by: Dan Carpenter Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171020002845.kar2wg7g= qxg7tzqi@mwanda Reviewed-by: Eric Anholt Signed-off-by: Sasha Levin --- drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c b/driver= s/gpu/drm/panel/panel-raspberrypi-touchscreen.c index 890fd6ff397c..d964d454e4ae 100644 --- a/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c +++ b/drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c @@ -221,7 +221,7 @@ static struct rpi_touchscreen *panel_to_ts(struct drm_p= anel *panel) return container_of(panel, struct rpi_touchscreen, base); } =20 -static u8 rpi_touchscreen_i2c_read(struct rpi_touchscreen *ts, u8 reg) +static int rpi_touchscreen_i2c_read(struct rpi_touchscreen *ts, u8 reg) { return i2c_smbus_read_byte_data(ts->i2c, reg); } --=20 2.14.1