Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp2829122pxb; Mon, 19 Apr 2021 15:20:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxK6aRk2uOBnG1AXz8Gi2Wq2qAheeiYlMKEBoj8alWI2xm73jABVomH2lOdrUHDORtgvq8P X-Received: by 2002:a17:90a:f2cd:: with SMTP id gt13mr1336452pjb.43.1618870858701; Mon, 19 Apr 2021 15:20:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618870858; cv=none; d=google.com; s=arc-20160816; b=VwDjbMTJadh8PnhnCv9Oj84Sgfg+26mdxUH5OJfaw2P3mVebCbKLXMTVbFP3QhzRfA Oal3JiUdnAsN2zhqXkh0yiIWwJnSg0lj/ENMMs/TmqoLFF5nwcpRmlN9Ma0COSty6uZ2 o4/aiX6CRlBTBHISf9YaAT8H19YFnr/+A9DCIhz1Pj9bV0Iybfk7uGldt1V3zIhdx57P sKZSBdBjO7AiSTe3FWC3Q0GDi2ke051jz0G4kqb6glc/liWtnNBtLu1TMXGQYkYYQX5H I+sUMrRxQHstxOU8AvvZMaY7RAFb/FsSoK1WkvB6b9QB/ghAO7BnvIowImGWkFNSUPvK 5+Fw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ogE3MqS7VKl9okJ4uncJjr7Z4QU6w6I8/Z/1x/qqYyQ=; b=qdL9kvVHJOlpsCXyMmbhHlwBX7tscft41L09+Gu5DK60WuQ6mXUgCWtlY9imzc6VZa 34WE5C91tQ+eKwJS0R6+QwP7uGpD8qI1aGLEScam4fNIyDd4LZqhzLINrGPIZz8AWEpP YAULqpO52v4HrTxaR2KNiboljzklCwbYbB6z13MGbM3NVSdid5FmDE/RiiBGQAut5qsD hPyNisBjspqO6Zpnm9+3fLeCxMnaQGJ72R9iXUR/lcuEhxm8psbf0odvZPCMXYOjsMDx aU0Abfk9qDW8NWvwBCuznRwVnDBcMpTeIWgSmbPyU7Cu4YbEZ2/8dj7mdq2Hfesg12E3 xBvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aA6FW5Pd; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p22si16421814pgj.188.2021.04.19.15.20.47; Mon, 19 Apr 2021 15:20:58 -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=@kernel.org header.s=k20201202 header.b=aA6FW5Pd; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242300AbhDSUo0 (ORCPT + 99 others); Mon, 19 Apr 2021 16:44:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:53688 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240041AbhDSUoT (ORCPT ); Mon, 19 Apr 2021 16:44:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DBC25611C9; Mon, 19 Apr 2021 20:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1618865028; bh=1H3mngB1wziDnZrSCLkVf32m5DqRuWUfzlvhLfR7xXE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aA6FW5Pdd7UqnvHZWoyR7kHegojgLsojYWh43VqUTxxNXm5g2XF5rrH/BYfoJLckR 9bvqn/dGrNAvK5XO2M4X6xkz9wfnGnjQgSTbAujmJpg5Dr3k/4azWa+UI/P3Y8kR2j lP7ztQxADYy4K6RJuisUvmYK7Ij8YDT3nPXJg9bGrqky79VWSW4HtKz6Xy724Ejjxu fZpNC4Kmf3xCDQVMcsOkE9y2c33PmINeINKveFYMf26IyWO7lyvRfXR0vxxX+Z+2LT rOYMYCl0uspsFU2SBjBgvmYBb0dBqgIT8korKssGIUv3b3fRGMvB/a7lUTX1q8hK4u /yWyoHWKUcYng== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jia-Ju Bai , TOTE Robot , Jiri Kosina , Sasha Levin , linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 5.11 03/23] HID: alps: fix error return code in alps_input_configured() Date: Mon, 19 Apr 2021 16:43:22 -0400 Message-Id: <20210419204343.6134-3-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210419204343.6134-1-sashal@kernel.org> References: <20210419204343.6134-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jia-Ju Bai [ Upstream commit fa8ba6e5dc0e78e409e503ddcfceef5dd96527f4 ] When input_register_device() fails, no error return code is assigned. To fix this bug, ret is assigned with -ENOENT as error return code. Reported-by: TOTE Robot Signed-off-by: Jia-Ju Bai Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-alps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index 3feaece13ade..6b665931147d 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -761,6 +761,7 @@ static int alps_input_configured(struct hid_device *hdev, struct hid_input *hi) if (input_register_device(data->input2)) { input_free_device(input2); + ret = -ENOENT; goto exit; } } -- 2.30.2