From patchwork Tue Jun 8 18:25:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 455825 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp4028575jae; Tue, 8 Jun 2021 12:09:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiTtvGSzFyyR6tV8w3mBlO+q0Z3TG1whYmYsf0KbRnk2+u9u/AxceOqpfgO9vimx5+iqxh X-Received: by 2002:a50:ee05:: with SMTP id g5mr7348558eds.73.1623179362176; Tue, 08 Jun 2021 12:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623179362; cv=none; d=google.com; s=arc-20160816; b=Rckavd96xLdKmPB/p8QUyhr9NW1zbwg8rkkoi2wyiz4sRdpA+MYtgHgv74tBTO/97S dd5xLWqtfjl80cGKNmAWJnZRa6LEd3+o7bKHidP9Tx4zxOtZhdNcBQjNhQJGxJI6jVCr CQWDBAsquR3+4TciHB/7c1AZex1J7c7WnMWqT4+05ugIFFAl2pe0Gcylgylj6SoyeiZK /JNtaeB8zYuhutjrll0NE/d5z+nLNWDCI9VhgzBPfO1VyxmzqCEJlTlhYklsUrAEpoot Ok80TpuyEXsUVVUbUS3Ho1fuWlKMe4rmcnGPmzKyYvnaM3VLJBQ24pSK2qxrQXFP2KFJ 3wbA== 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=sReJtFFgHWfB194lIb4c6YlvZYepO2DZSiMTiyoY4uY=; b=eQwf4ZCsp/oLknMljvZPJjOemRhUb5p+0s0WnkjdmKUQ/KiOw+o9LbxYTQfffLxxcS QBzKhm72Z1/2LIProgrqRvJD6SzFzrZimaJjlBX6QJB6xW1lMb5jmCJzwz/uS48y/6uP lwSobNXpUQEagZMCMzdKqlzOD/yPohfaEW/AxHQdY1lwI9+pMmz0lr4MCl6EOfkflK+F +JqZdUVxXOUGtfQpijRNz7GS1FzYfbQXoeMBzLW4M2WBRoyKeq+iK3IdSVy5usgB91lV 6RtqQkfbrxoKWGuRA4oGcgbCGeMP6voWBOCvDntJmzGDj13gjpN46c1T4awyIFlytXUl 4NjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ExqjIKp/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 s7si404436ejs.405.2021.06.08.12.09.21; Tue, 08 Jun 2021 12:09:22 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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="ExqjIKp/"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-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 S236223AbhFHTLF (ORCPT + 12 others); Tue, 8 Jun 2021 15:11:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:48210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237264AbhFHTH1 (ORCPT ); Tue, 8 Jun 2021 15:07:27 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6B18B6145A; Tue, 8 Jun 2021 18:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623178030; bh=Y+x07ts2834sKo/W/TEPkYGXiOK6fWJ6EvOPwwmPx4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ExqjIKp/n83+glHerHCI9q5k44ODnS842PDBtGkkQruhQikeQ448LLTH3HGrhvgbU yssr5bgrjNlrxICMlfSteEFzXUFsgx29g2LtU67Kzbg3FfSWsZXOCNHahjBI2Q8xcA MWV8Tv/yqO8ocS481swyU/EaowMC/IlHZfExfTe0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Zhen Lei , Jiri Kosina , Sasha Levin Subject: [PATCH 5.12 017/161] HID: pidff: fix error return code in hid_pidff_init() Date: Tue, 8 Jun 2021 20:25:47 +0200 Message-Id: <20210608175946.040861867@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175945.476074951@linuxfoundation.org> References: <20210608175945.476074951@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Zhen Lei [ Upstream commit 3dd653c077efda8152f4dd395359617d577a54cd ] Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 224ee88fe395 ("Input: add force feedback driver for PID devices") Reported-by: Hulk Robot Signed-off-by: Zhen Lei Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/usbhid/hid-pidff.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.2 diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index fddac7c72f64..07a9fe97d2e0 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -1292,6 +1292,7 @@ int hid_pidff_init(struct hid_device *hid) if (pidff->pool[PID_DEVICE_MANAGED_POOL].value && pidff->pool[PID_DEVICE_MANAGED_POOL].value[0] == 0) { + error = -EPERM; hid_notice(hid, "device does not support device managed pool\n"); goto fail;