Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4848169pxj; Wed, 9 Jun 2021 03:27:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdQq3Vvj2CB2Xpfki9Xz+pr4Z9yMQZ7Xby+Y/O3f04dvv5/ZHA0gh+aTuD7iqAJVEJZ0PG X-Received: by 2002:a50:cb8a:: with SMTP id k10mr30341137edi.267.1623234420853; Wed, 09 Jun 2021 03:27:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623234420; cv=none; d=google.com; s=arc-20160816; b=sESMfcCKI2gFmyyGgU0jDMK6eNcejaU2hA1DeBHh4sXufBH6Q6Nu5ASCk/xH0Rh8HW uGSQsXrhUvbaf9rwK7XTH8RxAV2A/KEyuX0N/CQErqVwRZYualt6P/PSgPrGKPX3YnUT 1jd0WDsAGMYEGotECZ4muz6IvuqYDcKHIaapZDQKBsYeR+lsF3uZEojPuvmQoyBF71J1 C0o0ye5HV30Rm5/HVunkLll4y2rvQDSXwFvVapN7Ykv49wHRdcDF4QrH76402dpJfIdQ mjNyEu5+0Ao0dhF7wQDJcn3cNekpxL8U/1rEii7gfaxJP6fjs5j3xQQieL8+Kesi0CPG Fc2A== 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=Qp4QVXV+I5NwrL+yrkdIAynMcvyGhhNOiT+ImoVpXGcTqW4H1QssmvgdI/NDvuCdSQ 2EYTS4CaNKaAnun2VS0tAYuhevoxp5/mzRTTRtBQtksyp+p6oKXYgK3AfChqBEccbdkG 0fLO783lr3xP7kNV/C/TJRzuG1mrv+xDfXAmp3GsCnu8AUcMo6/X6E9eQ1cF6JLKFL8H n6GdLiZbACXm6aWfhfZycy4jDZa5UEVLZn0BWEhflDVdLf2+iZdSe9p3BEHMlM1SBVI2 mH/FfIE/atGYEavxYgPmWI39iwLRyf6KHLtX9qupv+nOUlHDtdfuFQl4RzcCV5Wgk5ye nKfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=plicAHLl; 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 hh15si2084203ejb.221.2021.06.09.03.26.38; Wed, 09 Jun 2021 03:27: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=plicAHLl; 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 S235210AbhFHS4m (ORCPT + 99 others); Tue, 8 Jun 2021 14:56:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:47360 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236061AbhFHSts (ORCPT ); Tue, 8 Jun 2021 14:49:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E608061426; Tue, 8 Jun 2021 18:39:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177556; bh=Y+x07ts2834sKo/W/TEPkYGXiOK6fWJ6EvOPwwmPx4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=plicAHLlNsMoEEwOA7fSfvMklp5kGLe7yUh995KLXrhcwikZr3wgVn3TUGywcNWJv +tN+b99P8pMB18USomxXk66qul+1OdwrlzXKehE4KRxTrT4TF36BWB02pGQhA2NxSx yevVT2g+pc86HE+WaLyQfW4dK14RpRx2ngseKzd8= 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.10 016/137] HID: pidff: fix error return code in hid_pidff_init() Date: Tue, 8 Jun 2021 20:25:56 +0200 Message-Id: <20210608175942.954406863@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175942.377073879@linuxfoundation.org> References: <20210608175942.377073879@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 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; -- 2.30.2