Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp691820ybg; Mon, 1 Jun 2020 11:49:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwchsvh/izejJy5tzj3bLq+r/8/TMAnmOKb6ZxV3Bi8Y2urwRhWzxitUUc/hPp0EBNoE4Cd X-Received: by 2002:a05:6402:1bce:: with SMTP id ch14mr23497584edb.80.1591037344237; Mon, 01 Jun 2020 11:49:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591037344; cv=none; d=google.com; s=arc-20160816; b=CGSoJJ5pRwvvunnfPCgycS4MkLHedApSIEDIfwYhoekYjpyQykwN7l0jubN0b2SgJa VyNhpHvtpcnrVOmarbwiT1CddnWKBIOZdi08i/S6y0BZ9iw0LDFp2Wo8zMVoT86T47od +hAbmj6F2UDXg5FrF89Z3LjoNqQ5R6GL+x75OwO0z3dwsGcF+nXzDzY9GdGuhII5HvI2 wl6qs76WRN/0cJWnIgU5VlDNV4K6Ke/kUimZiy3y23WTSQ0229dqRKWapC5vTTELVxt+ lONutU4TAlXh9WQKwWe4dS9iGaKXOdf2O8mG7zAEjtnfVVDreHIzo9WqDyVwWN3FhFVu bTTA== 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=UuwnMXAb2mbDB2HWip0u/rcdZwHChqQuzOpU9yrV2js=; b=tUWRkRsjNBaI3axEDdlI0qLkq6jJb9MDEhu5u0oXkD1KgSr6QrVS0BVe9dG7DEizcc UnOtkbyxee1Hbejq+XOJI6ZzfVHE2WF8wuZ897NQW16bpfk/sGUtNHTh0hX5rltZRSW9 GJUaldpYY8gdEvDDsTr5WBNrSLljnaQeyT2LAOkLNmRvPY0eINuBw3b/JCvPQUCCGp4G xCLujQWDDanguYD1zECYQ8VoOEhEzyWuXiLvN+YlHAmDI5BUFlXflFmO2T2NB7lE03ZY iBgU7tKUQAl5U1NztGnQ9DJTjduoYcD8sRwcfY5OMf+8ZvmedUHPebQMRz8VpsJJ/m7T ++Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nGpVh3Zr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m1si130711edf.548.2020.06.01.11.48.41; Mon, 01 Jun 2020 11:49:04 -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=@kernel.org header.s=default header.b=nGpVh3Zr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729029AbgFASrC (ORCPT + 99 others); Mon, 1 Jun 2020 14:47:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:54750 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730743AbgFASIf (ORCPT ); Mon, 1 Jun 2020 14:08:35 -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 6EE74207D0; Mon, 1 Jun 2020 18:08:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591034914; bh=kMZ8z483ON/zTTVEyFoP7XJhnrafJFQO56c/L6OUIsY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGpVh3ZrHDk5HNFjAYqpj+Fc2Osvmn4Jax7XNCScxuwvgQsaPsFIH9TP2D5kNpfkx Rf8UDxDsmJ4Sh+q+LwZnRjhUMlY09gw+N6WaNn3uP4PCgCdkeBoD9o+O+y/k2vLR4D CKO9Nd7rmmBq8CRNqw1VYMqhg09C8gF4lOZBRryk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.4 070/142] Input: synaptics-rmi4 - fix error return code in rmi_driver_probe() Date: Mon, 1 Jun 2020 19:53:48 +0200 Message-Id: <20200601174045.073010822@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200601174037.904070960@linuxfoundation.org> References: <20200601174037.904070960@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: Wei Yongjun [ Upstream commit 5caab2da63207d6d631007f592f5219459e3454d ] Fix to return a negative error code from the input_register_device() error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Link: https://lore.kernel.org/r/20200428134948.78343-1-weiyongjun1@huawei.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/rmi4/rmi_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/rmi4/rmi_driver.c b/drivers/input/rmi4/rmi_driver.c index c18e1a25bca6..258d5fe3d395 100644 --- a/drivers/input/rmi4/rmi_driver.c +++ b/drivers/input/rmi4/rmi_driver.c @@ -1210,7 +1210,8 @@ static int rmi_driver_probe(struct device *dev) if (data->input) { rmi_driver_set_input_name(rmi_dev, data->input); if (!rmi_dev->xport->input) { - if (input_register_device(data->input)) { + retval = input_register_device(data->input); + if (retval) { dev_err(dev, "%s: Failed to register input device.\n", __func__); goto err_destroy_functions; -- 2.25.1