Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4326857pxj; Tue, 8 Jun 2021 11:35:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfh5hEfn332/8C3LSDtEGD5Ww4au0aJcBHDvp/dwMmHQcstGXEXAfJcSuJlXGPrDjrjCxS X-Received: by 2002:a17:907:6288:: with SMTP id nd8mr25265639ejc.223.1623177301000; Tue, 08 Jun 2021 11:35:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623177300; cv=none; d=google.com; s=arc-20160816; b=sheVsMh+Rau07TMu2pDn76xqDU6+YrRvqeSkCIgEGKj4ioF87faZAnaiAq5uchDV7l QKRgIpjI5K2vYMjX9saLqNizIIGfYiZUtS94DpGhaSKmZfsPy3Rbn+Ov5mTAHu8zLDZF 5UPHgO2OTh5UCgZh331puYV76CByedxQAcZtdTmsfF2FfoJqDV1jMPTs4qMCqdEzX7tT 26pEp0NozWWxggDuPP2A0n2bVeSG0jXrhQfC4hSMEiA5cGOa/JClilHc5qoweCupdJTr uTnm8D14UFgw1LsOYNIVTGwE6qmH5UD4y9CwXQKzYcWgQqm0hTN/8biopEL9A0uHdMpA z/xw== 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=J7UZByMJSOAY6reM4//XCQ6dn1xKG/ywPwyWwiZHH0M=; b=PDLIqXpjMXcPprp5DBh0R9vMQW0G+f55rxrbY93tLyclgMUqZhb9MCDoezmc88K1l+ h/pSvp9dnOeEF4N445OPszUt3DGN7tN7O8+LooEJ5flzzPo+BdWnjeeKBkiSnxafyHIk bXzTqp4zw/AyLgXDXZe+rZ4f39bM+n+KZP9sgq/MJ0txHGry6d5Eq+jsa/09e7BlzPTH XZLEq0Osn4gPuPjPX8HvBs0AMniSOiLXr89/gkwq1vEsZPxwhflxIN3QryPgJcjh9nvV grviK0rZKIGtzjVRIXjE0CzYOEBVE9U91PpzPSFCxB/+AnikAOMr6YvzuMFfvCrlNKjN XwdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=W5Ibkbhr; 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 w4si360939edq.419.2021.06.08.11.34.37; Tue, 08 Jun 2021 11:35:00 -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=W5Ibkbhr; 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 S234199AbhFHScX (ORCPT + 99 others); Tue, 8 Jun 2021 14:32:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:56654 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234191AbhFHSbk (ORCPT ); Tue, 8 Jun 2021 14:31:40 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4EA35613B9; Tue, 8 Jun 2021 18:29:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623176986; bh=lKpCVtXD3B8w7NgXNJYxyJ62U+u4UoNXBhi14EH6Lao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W5IbkbhrpLp2syOJP3QXcn4CmZLiqVfoMJDlHOpMiWxXB3SXP7eP3jbDvuIHyTlwo 2IcZQum1hyD90U1ah2/kG+cljfkbWYWIenRXTw/GRHm9iSW9IB6N/4STI43vlNvCt8 FMHXGTxsmAgQxlsJ4Kx7luc0SeUKCaKiSEANm4dE= 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 4.9 08/29] HID: pidff: fix error return code in hid_pidff_init() Date: Tue, 8 Jun 2021 20:27:02 +0200 Message-Id: <20210608175928.089643488@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175927.821075974@linuxfoundation.org> References: <20210608175927.821075974@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: 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(+) diff --git a/drivers/hid/usbhid/hid-pidff.c b/drivers/hid/usbhid/hid-pidff.c index 08174d341f4a..bc75f1efa0f4 100644 --- a/drivers/hid/usbhid/hid-pidff.c +++ b/drivers/hid/usbhid/hid-pidff.c @@ -1304,6 +1304,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; -- 2.30.2