Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2812518rwb; Mon, 15 Aug 2022 11:50:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mqmqtOPAszxNM0TJdP4rdU9swWr/FQZSeOFST+lfjLipfemMS88FJbeqptfg8SMWPFMBU X-Received: by 2002:a17:906:8a6d:b0:730:9cd5:6688 with SMTP id hy13-20020a1709068a6d00b007309cd56688mr11212849ejc.158.1660589458911; Mon, 15 Aug 2022 11:50:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589458; cv=none; d=google.com; s=arc-20160816; b=ZuDG0f8swp01DH63FkjgftSNxMu7k0BDq3RmlI04uGPgffuZwVZks+dE6eQUAGC+uB K6CxPlAZ0O54mWgQYDgQ/ObdeXoKuHgGc/LH4tSWMwK+wpzDCCkeNBCVGx7oUe2TzXzx INpcKSB56Z0kAwP98u+OgqStKx+OInKaFN3b/Sbs5Nr/h/NgfATv4ab3XqJSKIYuqHjW N2yN4vnfBeS3G4vU1gGEXk+LoNeqVobaelT9wKmH7mBYKdDos3nyV0NLMBiCJdPuPVFk 7lNBCqSy5re1tdbQEm+wkeD/4r/w4g2uBweShDsWqOXDQMws6COTbIkoehuCOjEj1isf 5onw== 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=yszZRcoEh1N1CJWSSk7MHT9T2cMwOFoLgjfbPVlt1jY=; b=PIP6f6Tl1c71equnaiqQFOrx2LZHGqCRZ6QX1EfcKRgXcE4Gg0ujHeHiGXnkJyxRsW 50sphp+ndlxBIFpn7oyD19cVlSLwY2oBXz/UKuQElh9gVLtmuXX5bv8BvKcWUKSzY0Ri XHssSpELHb1+g7teG2gQ8X0IQX4GRyseACB63uyDikwJ5jaC+HuzmXeTzaBTPJCWODe+ eDK0Q+rkFxEp6LcnXoqd+bgsEA9x4NY30IKEpc5RZO1l3PzvGf1oRY0n4YygkEQvmb0M J2ZLQVkWojXSVYgE52E99rV1pL1U07VqPZ59OQPkat6Yl2MoH29FKFvRglQx1fsARw7b jTog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=K0fCkzWN; 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 f12-20020a056402354c00b0043bb8df080fsi8027672edd.606.2022.08.15.11.50.32; Mon, 15 Aug 2022 11:50:58 -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=K0fCkzWN; 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 S242819AbiHOS3o (ORCPT + 99 others); Mon, 15 Aug 2022 14:29:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242438AbiHOS2m (ORCPT ); Mon, 15 Aug 2022 14:28:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1CBCFB9E; Mon, 15 Aug 2022 11:20:15 -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 dfw.source.kernel.org (Postfix) with ESMTPS id BCF1660EF0; Mon, 15 Aug 2022 18:20:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FB46C433D7; Mon, 15 Aug 2022 18:20:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587615; bh=h/3vNwF2fZo2vYAizALpNh0m0PgJAAUekHj5HiG8gUI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=K0fCkzWN+Z6VPjSjvCp3sMiwOxA9O2teIDZitw8MQ1bn+SXoN1aBlGZBWkWptDcxz NQXBu/tHisYCn7sjW2PL0QEvQY4aB71L/h1CyOvnbrufaOZrVzkGhxDdMOF+TUx32Y z95Dq7vbmH3yXnQFv4qo8qtvAIauXdnOINwL3sj4= 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.15 139/779] ACPI: LPSS: Fix missing check in register_device_clock() Date: Mon, 15 Aug 2022 19:56:23 +0200 Message-Id: <20220815180343.249574416@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 30b1f511c2af..f609f9d62efd 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -403,6 +403,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