From patchwork Tue Jun 8 18:26:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 455801 Delivered-To: patch@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp4008827jae; Tue, 8 Jun 2021 11:44:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzFEEuNbksmo/0LNbX91lHDAoFaTGt/cKCI7zJltvDRd4de0jufXQ8IzKncNs95RT3+yroF X-Received: by 2002:a17:907:1b02:: with SMTP id mp2mr24752459ejc.196.1623177841155; Tue, 08 Jun 2021 11:44:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623177841; cv=none; d=google.com; s=arc-20160816; b=eVeO5L/NJjgK1JAKwgkN+8rhByz10yWpVvz04O3HYBSmy8osGOwFER39J65qle4lbH nsfrOS0NNXvOLgY6dIm/CgEhR0OQxkrrb78zCTorKZgf3AmvYXAhdYSi3gCIObUz1oqt CkNwlmaJopx3FjN+uchORIPjejtddPeO8BWKviDqyjrx82nBJTw+NwcznLphkH+jJvN8 +3MDdmKr/Bn3E5e0R8lJ6yQtqqPhzG763uHvwo4aGtFrMb0FX+L99I8GF+gK+2k83CdU g2KMaibcBZrBG77LNXpZXkk3eUFmQv+ov60wraT8RaQFs0uAID9AOMa/E5nKklh9ztEv GqsA== 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=tQVdGXE9V8ZjRf+/PvTEdYA5q0pylfCHI9ev9DpaTKFPBgOiTNmrjV+E5z8yZpmjbM 36sx7QtQKx3xhVTSqFIxTfGM6TuAh3NLfIkI6scdrKiMY9bpovFWzVjvnm3icsaaw9xj 3vPfu7q/cLnRi8qJ4mayY9oy7KrWWClecSm5djWm+8STx+DpY4og2+T99VPllBsTUzy3 uL5ZdhCX+iomfrlGlzvZKEVVG4boW2YwO3QunvwNDXfID+cUXk3sO9zCf8IVSLlOqZDR +aU9xO3aFoj0Oy4hWlHvtMl6EruEavRQ2fU7dGfXFvmnMg4or54gtI3AVsbGxwPnpGDQ PZsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EKER0Ij+; 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 i8si367915edr.440.2021.06.08.11.44.00; Tue, 08 Jun 2021 11:44:01 -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=EKER0Ij+; 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 S235236AbhFHSoJ (ORCPT + 12 others); Tue, 8 Jun 2021 14:44:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:38012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235233AbhFHSmF (ORCPT ); Tue, 8 Jun 2021 14:42:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3B13F6143B; Tue, 8 Jun 2021 18:35:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623177330; bh=Y+x07ts2834sKo/W/TEPkYGXiOK6fWJ6EvOPwwmPx4I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EKER0Ij+nG93H8LKBbj+BHWVT9fTjYUv8XCfC7ca9ZKxsYdlWMhEsgnd1CpzN4TRl ji8PjDiq7vPwn7+ENodfjkl9Psm4n8axtVF5i8eLXJxjVACTiZ/dIlJ7eaIxMQsQAj WmcryNvN+YG9zfvzRCiI4QEDQ5zkYwjD9yiEiQp8= 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.4 14/78] HID: pidff: fix error return code in hid_pidff_init() Date: Tue, 8 Jun 2021 20:26:43 +0200 Message-Id: <20210608175935.759665554@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210608175935.254388043@linuxfoundation.org> References: <20210608175935.254388043@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;