Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2920523rwb; Mon, 15 Aug 2022 14:04:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Daoz+b8CuaJv4v+cHkEVzALzwUkkfgJedc/f/4RQsUshLKxRbkid33UnTG1KQ7OTMQNOZ X-Received: by 2002:a63:87c2:0:b0:422:c487:f674 with SMTP id i185-20020a6387c2000000b00422c487f674mr13065720pge.471.1660597492052; Mon, 15 Aug 2022 14:04:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660597492; cv=none; d=google.com; s=arc-20160816; b=S8xalsM6Wv3WVBOd+D/vjKLplb2m8SqfceRKz5UaehwEByH+4CSsUgGUfPw9vk/0jJ FmDPUOn8q0hCwDBN42+TccH5LZ0FQshBk6z7Trvsavk5TAp4dMRHd29gr27pcwYVkZHe o50fWMfJXKmULDeuXN9MusGzj06pAiT7empS5AyTXxll8eqasspebMaIDPeK0rnlHZhu OG9z8sme4X3yjflt8k9XoSdX+P1tT65xIeO9QerbSjLD9OeycngvIGMX7FdYA3C6vLsN Aj4LUGaqi+ZicAXdTR8Bl7GcT2RAQFnQXsA15S6CvspDcvLqBeO1p/eALoT3D6oN3MJO 3KPQ== 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=luoiWIEB38EESGuBCmQ2yXqaH5NQW9t1AqwIuGRPoLHwQj9KzOHDmpyDqPUWPFkegy Pu/eh1O173MJS3oJPelnr6TXrqDnIeO9cVKTM47uzx5gwOzPEBEC6okvu54w+jL+0eeh u8gJnkHYh2UXQCr/B8DRziJ9FGRjZJxZtRlp/hQt5DT/6N+HotEUKXi/KZPfM4OgHYt6 OaRmsvnFdii4CUVK4OlbMqH0EizNLO94JNlC87PCDsHh2rZG0BgNrk7EOueyhDLl/FLd V6lcWhRtRw4YQu3pqeMP93Rd0qLg0r/vu8BCn5qh4UK+4u25HouJESVK6UxTaArqf1ZU DPrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="qUfcYe/V"; 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 a17-20020a17090a481100b001fa5ea8e65bsi8011192pjh.19.2022.08.15.14.04.40; Mon, 15 Aug 2022 14:04:52 -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="qUfcYe/V"; 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 S1345589AbiHOUeI (ORCPT + 99 others); Mon, 15 Aug 2022 16:34:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347476AbiHOU2B (ORCPT ); Mon, 15 Aug 2022 16:28:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C68CFA1D31; Mon, 15 Aug 2022 12:04:20 -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 5FFFFB81104; Mon, 15 Aug 2022 19:04:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0406C433D6; Mon, 15 Aug 2022 19:04:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590241; bh=Sja0o4WT94abP/9yeowwf/8JUqSGSH1x3gwkaizUJp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qUfcYe/V5LYMsAiQXvAd9ndpxuDwwfbBM850dtFvR2CrREFuJRZUSWdNeHwSNd1FW WGQqxppe51VP72+FzW1o5t2ALnU5fGx+R7wc7WLMy1l9VNdOxBqMRB7eKqjHgkTVp4 bgMbKisXyT27gU1ErEyZHrSEnzciYoOvTSHd0o3M= 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.18 0167/1095] ACPI: LPSS: Fix missing check in register_device_clock() Date: Mon, 15 Aug 2022 19:52:46 +0200 Message-Id: <20220815180436.516565608@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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