Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3021110rwb; Mon, 15 Aug 2022 16:18:18 -0700 (PDT) X-Google-Smtp-Source: AA6agR5+r8YDkaOVeESml/Ioh1hkUGu21r7EmBfc/X0kewBcDjtukqjm+TMcaFzqySN+muN85oRa X-Received: by 2002:a17:907:7349:b0:730:5f86:129a with SMTP id dq9-20020a170907734900b007305f86129amr11943996ejc.466.1660605498624; Mon, 15 Aug 2022 16:18:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605498; cv=none; d=google.com; s=arc-20160816; b=KUJ3ePuAu708GalzzRCK19ZqeMVs56eIbmX+dNjDBo4bCaQqaEeCiBsX2DW01vtkp3 iHMbLi1RtIAgAEZoELKcCD9hqn5wqHe/ILXWKZ8nB/44ltOzS5T5amQJGg4V7I1CXyyq kH4bLO22rT/v5Igu+OV0snQFv5endW9X8l05BMgUi+rrHm5Z+0wBgm6GiPfFF7PqUEPJ srqzzRk0L2Yw7n/ICdwxJpdnkMMeXWB/TY8jqw50vxeYcxJlix/t2/9aiYTgLWk5yEkK 3VojbWr0soHdSH762HhCAj7IqUOVCo2Rs8bvv9yUlXGb0f2r9dXBzT7zMn8r8rmZs6EV +w9w== 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=0XVxdyXOqVCctiqDzDl5vsEwjjpq77lGq9DTzj2ET+s=; b=OwO0i1tpxAwkOsPyRGYhIqDmalX+aaWkk3v/8uje4uJJ6RyrtBH1//dGq5LkI6816T Bd4EWPLfHo60TehQNZVMHVEaE4yfWIVJNPZAopbYB0nCMVCz6vvYxdBAtjts2iv9fGC1 gByr8i5YTE6p9ueGlrHRtT0lcWhyjwGh3TtzgyxHnQpKdOQLxG5VapwMFoMksebe5dRK EgpEhfCCg43mPYhnvAS2UHBWseDnWo5ff2Jnd+EmFazHVRtOZml+nyNPZ1xIg8Pc1jEH Y9ueoBcWoRMbzWTWV1eVWPZ5T8iSKXorUX9tCUS+Zdaq2hUTw4qfaciYcrW0poLJyDXe oVDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uoMqcQPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sa15-20020a1709076d0f00b00730551afa8esi9736397ejc.885.2022.08.15.16.17.52; Mon, 15 Aug 2022 16:18:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=uoMqcQPA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1351330AbiHOWl6 (ORCPT + 99 others); Mon, 15 Aug 2022 18:41:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350863AbiHOWhP (ORCPT ); Mon, 15 Aug 2022 18:37:15 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F591E0A9; Mon, 15 Aug 2022 12:50:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 01BDBB81148; Mon, 15 Aug 2022 19:49:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D5D6C433C1; Mon, 15 Aug 2022 19:49:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660592964; bh=Sja0o4WT94abP/9yeowwf/8JUqSGSH1x3gwkaizUJp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uoMqcQPA2OODU3VigbZlCdOWJNmxxQunJNc63Mlf6yq7RzcX6//u2eRdu7/9UETtQ gn15b2FzDFzga9XG5Lo//S/18qg67sTPHPJAU9A+PXkLwBN5QKgK1go8ux0tyQb3rO YcqEtzF4ppZ2Mgu9bVkMspsz3Jn7HcsDZ4lrhjoQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, huhai , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.19 0180/1157] ACPI: LPSS: Fix missing check in register_device_clock() Date: Mon, 15 Aug 2022 19:52:16 +0200 Message-Id: <20220815180446.940638395@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: huhai [ Upstream commit b4f1f61ed5928b1128e60e38d0dffa16966f06dc ] register_device_clock() misses a check for platform_device_register_simple(). Add a check to fix it. Signed-off-by: huhai Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/acpi_lpss.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c index fbe0756259c5..c4d4d21391d7 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -422,6 +422,9 @@ static int register_device_clock(struct acpi_device *adev, if (!lpss_clk_dev) lpt_register_clock_device(); + if (IS_ERR(lpss_clk_dev)) + return PTR_ERR(lpss_clk_dev); + clk_data = platform_get_drvdata(lpss_clk_dev); if (!clk_data) return -ENODEV; -- 2.35.1