From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9AD9B2E7379; Sat, 30 May 2026 17:35:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780162554; cv=none; b=qwxU33x5yRUElTP5fnREaFwIeFl8nNNgFG07xFk1VLPztkOtvMsqpWBL8Hs+1Hu9byTgqA70/kElea6zJyzLDV/MCFg52bznJrUhlWARZtq3y6XnfVk+BhWeb3m6UyfCxu0WxArR0/opySJHvZBNTZ+HsF9xKchRGXEYPQlfqYs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780162554; c=relaxed/simple; bh=caSyWXO+ehRPAm08K/jJprI1lapM2OUlGZQqLIWKzds=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=tC0H0m9hV+XHU+4OoEJCM350rqPiIlhpuVm3mHHAqDY73nkY+Hf6exCpT5n+J3Lffu3sFIbHFaIwoJ1M4siKnFJaG8vtbWKvxf6f9G+Mr3OlMFMUiQlKwi8aRjGqIMFnpZWqcCt+QbxrfIyf7P1aSuxxVvinBHQKX7a6RJ3X4kw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EK2qduZx; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EK2qduZx" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E02691F00893; Sat, 30 May 2026 17:35:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780162553; bh=X3T2BD5GMCgNhibbRZ3yaxEckg/LhOsu2LqD+XiM2kA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EK2qduZxPzioudjb90AfRIUAhrZnhKWfEfHR4JJMRETwI2t3oj0CJm5E7dHFdeHev cmBSWE+TW+uUxCXk7rWc9xcSbop991ZM0PerB6Y6oK4q8Fpm4+cIRGRdM3jHbjfDL9 5Z7tPnQbe79BnYpdR7gd5Rmt0p/JdybUA0c/ln0U= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Rafael J. Wysocki" , Andy Shevchenko , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sasha Levin Subject: [PATCH 6.1 957/969] platform/x86: hp_accel: Check ACPI_COMPANION() against NULL Date: Sat, 30 May 2026 18:08:01 +0200 Message-ID: <20260530160327.196149774@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160300.485627683@linuxfoundation.org> References: <20260530160300.485627683@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafael J. Wysocki [ Upstream commit abfbe5ee8ae89f1f5449790423d5dd3e423545bd ] Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_COMPANION() check against NULL to the platform/x86 hp_accel driver. Fixes: 8ebcb6c94c71 ("platform/x86: hp_accel: Convert to be a platform driver") Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/2425918.ElGaqSPkdT@rafael.j.wysocki Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin --- drivers/platform/x86/hp/hp_accel.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/platform/x86/hp/hp_accel.c b/drivers/platform/x86/hp/hp_accel.c index 6477591747cfd..690825c9117f0 100644 --- a/drivers/platform/x86/hp/hp_accel.c +++ b/drivers/platform/x86/hp/hp_accel.c @@ -300,6 +300,9 @@ static int lis3lv02d_probe(struct platform_device *device) int ret; lis3_dev.bus_priv = ACPI_COMPANION(&device->dev); + if (!lis3_dev.bus_priv) + return -ENODEV; + lis3_dev.init = lis3lv02d_acpi_init; lis3_dev.read = lis3lv02d_acpi_read; lis3_dev.write = lis3lv02d_acpi_write; -- 2.53.0