Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4324823pxj; Tue, 8 Jun 2021 11:31:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuh+rozWaNBa2pgtJmK2J12iVIvKCweAtwZbaUQfc11lPkuSpMuUbCOLildtD75dF2qy+a X-Received: by 2002:a17:906:5d14:: with SMTP id g20mr24184501ejt.243.1623177111602; Tue, 08 Jun 2021 11:31:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623177111; cv=none; d=google.com; s=arc-20160816; b=ky/SH3kPHqkjPrgcZi2gH9DgLuOYzEQUEORIgSQnBIGmIPi9DT7J4PZLFA86KBPwBk 5U9j2bwZVDcckkZ+EucIhl96rirYT8TKyW+lySV1Eg48Kbi00ggdpIWQiXBJgnM13L/n 4IBWA5Na6kDplc3CuSzPrvWt4uA93xNfgD2E0+B0nu/RZgodt6C24CiYAcqbNxUJxUcN 5Ew9VaDHPHZgokrAWMmZrqENUHYXWsRLpHP+HKM7UhywIafXdYJ9RipiDkwRCMadJ4Hk YcYOEByYpgg76ZPapN98rAV9A/r1NVOlhqP9p7Xjrn2vOdZ5ygIa5bDZxW9fgiHBwl5f 8ENQ== 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=Uw0IWTzbRetGFToGOhZ3gXUuF3OSlpoDw0uSXILP4Oo91WRiWSVXFOfV0y0IJFdwp8 YwIiP8nSLrIaH1xUle/g/SSEzsTaBJfsMJZnqN+HfzCa230sjTp7Q3cBh1BIJXtRir2R xbhqBTP06e9M6x3Z4JjL0EIta5TSfLebSncUPzxfJban8B/T9o3EBRwY3kQH9baDKos2 AU8JJANpFIvKpgvZ5Yd+erkzTj2IXKtKoFcOysGvSRVI31DLPb4FxGv02exujfzBJWI/ yXZlEgkTLXCqO5mbKApiQxzDdBkbd6n1IwYrMHUnjaX0/Zl0ZgJS+ONWiaBVFM3U+jxh /alQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=C5gouUi8; 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 n9si376412edw.373.2021.06.08.11.31.28; Tue, 08 Jun 2021 11:31:51 -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=C5gouUi8; 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 S234078AbhFHSbD (ORCPT + 99 others); Tue, 8 Jun 2021 14:31:03 -0400 Received: from mail.kernel.org ([198.145.29.99]:55748 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233801AbhFHSa4 (ORCPT ); Tue, 8 Jun 2021 14:30:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C07BC613AC; Tue, 8 Jun 2021 18:29:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623176943; bh=lKpCVtXD3B8w7NgXNJYxyJ62U+u4UoNXBhi14EH6Lao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=C5gouUi8IevNdoJ5L3gsSrIxH2VQJpJMEeYflVoj3H9/eM+U5HshC/pKO+ojjZc1r 9x7h5c18UOBft6r6DdkuS8sgIO9AJkUfLzYlakwOPAPbsuTEe6A89AQQwt3wbY3xxf K1sz13LFfG1G6NXL30zddy8zxgKD/qBqSZyJrdSc= 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.4 05/23] HID: pidff: fix error return code in hid_pidff_init() Date: Tue, 8 Jun 2021 20:26:57 +0200 Message-Id: <20210608175926.720537449@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175926.524658689@linuxfoundation.org> References: <20210608175926.524658689@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