Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3285593ybb; Tue, 31 Mar 2020 02:06:28 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvKFyuWmcEe3QXD6+XDxbhJVzEyIMmNgCbOSXSXFnAGPc43C6zOcJBqt464NOUuTk/WBpaF X-Received: by 2002:a4a:9c86:: with SMTP id z6mr12862959ooj.68.1585645588227; Tue, 31 Mar 2020 02:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645588; cv=none; d=google.com; s=arc-20160816; b=eY9oz+hFOzQFSlREvpcQecLCtpXFssKBkF5jSngE/WQxeRBEl28FIjWEWvYibdw9Jy IfwIgAY5pMA0qloaOXhiKUnSsvl6/DIqLyzBhePFVcRnSA16R2TsnigUqkKtSflENhag wp/57K7nz39BDACRsZ9jrn044Gex+/AzGVjrG5tCvYyvIdlp3VYDF12v/woqcljjqcL1 zC8QtJhDttvQuE7fMCbBXf5gXl3Pmf7WIy1Ljz5xNAj6WZxmsBcijbIpeMy/PcB35To+ OKfK38FWlhjMJZkA6qpd6Ah7KM98cQkv1B5gV7FskSoRR+OcCWHpJPiLhuu5Lg1TCNvT d9yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=m9ursb7j2gty/usv8mkb3/iuaT9cHwjfyYZZGgcLVz0=; b=Pr32aOj1fgThHWYz+zZRIasEdioWxP9OPWUFKSsXw9kHgoCLtXexCfIDMpkmHwJI8U L0tXJ1rz4G/sGckE5F7IVwUtOmhZLLJvuYOXnK4lbkjJmnQuCjs+NDKQdff1WfgUF89g TONcF45WHMSvR4aU3bKEO3xH6FlN+ZfAaLGrbYSfCRFiSko0IrybXBvaegd3zD5t0YAO +yYItTXJ9kUO7oOF2WC93rn4fxCcWA2DJKzNdFs0lzHNvdKUcoF/Sxju5i4iAqZMA2zC m++krXH0o+dIQ8t6TdaBVij1KMREvl9L9qYrsJ3erD6bn71uUGlW+nJgsY4XmwESoV1C fclA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oohEHjE1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t2si6624925oih.136.2020.03.31.02.06.16; Tue, 31 Mar 2020 02:06:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=oohEHjE1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730901AbgCaJFc (ORCPT + 99 others); Tue, 31 Mar 2020 05:05:32 -0400 Received: from mail.kernel.org ([198.145.29.99]:46560 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730541AbgCaJFa (ORCPT ); Tue, 31 Mar 2020 05:05:30 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C735720B1F; Tue, 31 Mar 2020 09:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645530; bh=R4Lc+71PGFMVycjmavRdG/jAUNmy4bDOa660TR9oaVA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oohEHjE1Tvrb4g4CU4cnzkq8pR/araSZlkWv2AZtnB0U0gk5xXi+MW30/1z44T1mG 2b3Ata4Bpf0K6cmgUg1w9UtHCduWaCLHGkvOGGRJrWJLR82WnlrRaKUZ+oFUfB6wAR /sjIjMG4vzQEykXTEfPSIVlzffc5794BCImzHygo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Dmitry Torokhov Subject: [PATCH 5.5 082/170] Input: raydium_i2c_ts - fix error codes in raydium_i2c_boot_trigger() Date: Tue, 31 Mar 2020 10:58:16 +0200 Message-Id: <20200331085433.024107683@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dan Carpenter commit 32cf3a610c35cb21e3157f4bbf29d89960e30a36 upstream. These functions are supposed to return negative error codes but instead it returns true on failure and false on success. The error codes are eventually propagated back to user space. Fixes: 48a2b783483b ("Input: add Raydium I2C touchscreen driver") Signed-off-by: Dan Carpenter Link: https://lore.kernel.org/r/20200303101306.4potflz7na2nn3od@kili.mountain Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/touchscreen/raydium_i2c_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -432,7 +432,7 @@ static int raydium_i2c_write_object(stru return 0; } -static bool raydium_i2c_boot_trigger(struct i2c_client *client) +static int raydium_i2c_boot_trigger(struct i2c_client *client) { static const u8 cmd[7][6] = { { 0x08, 0x0C, 0x09, 0x00, 0x50, 0xD7 }, @@ -457,10 +457,10 @@ static bool raydium_i2c_boot_trigger(str } } - return false; + return 0; } -static bool raydium_i2c_fw_trigger(struct i2c_client *client) +static int raydium_i2c_fw_trigger(struct i2c_client *client) { static const u8 cmd[5][11] = { { 0, 0x09, 0x71, 0x0C, 0x09, 0x00, 0x50, 0xD7, 0, 0, 0 }, @@ -483,7 +483,7 @@ static bool raydium_i2c_fw_trigger(struc } } - return false; + return 0; } static int raydium_i2c_check_path(struct i2c_client *client)