Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp3392128rwa; Tue, 23 Aug 2022 04:08:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7iMhiMByiidiW3t+ZuN0EAMuEab2wKnyQKIjPqS1df+FgJ1Lxk6F0/eJnKVDUxWpieudTj X-Received: by 2002:a17:90a:1b2d:b0:1fb:25f2:f8a1 with SMTP id q42-20020a17090a1b2d00b001fb25f2f8a1mr2729675pjq.178.1661252918996; Tue, 23 Aug 2022 04:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661252918; cv=none; d=google.com; s=arc-20160816; b=Wwymy9foBoaIdPylwinakmpkaCtWG23bwBUmsbgelcywYVruaZzIfM6X9pKE2K9rBS IQABRBQSUy8nOSiYrlrQXnx/Oeeh5TyrG9wqT0nofAKe6N0eKj1XkZHgN4m22DVsNdsJ JgT6I50ZuIjjqN+agO8fts9CQNFF2ZHa3Lokp9rrQZizQunTTkX98+awqscwIz+DJuR+ axBB6nal7iDJjpT1u6UxVZZxaef7/kMrvaL8D5/e+vgtWvZEHcWl3LyFBM0qaXRyienT nKd48G25BCs0zJ4t+4flrj9jjJHXYWXISMiIRI/buOlt9ru0PgR/NPLWeHG8mD8vIY/y cXNg== 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=G+pzbbttbQV3E8nyVHNz8cO+fp57/DSM31SMkk4rJEU=; b=H3e/Ziq0ZAJ+8fGOV4xZ8/9OItIVdaIuHxicknD95sCe7Kl8G0cN662SGXS+029KfQ J8fMg6LC9y531hvCJK9634ZCXc2my/vO81DFsnWgseAxOxGFYaP+cAEZk+PEZTzvSlrx G55O0ULWkt6cJ/hXHVTcyHbU0zb/ESwmp9+Z2gkFnTsoBw1NBCfkxmDQC+CGV8hrtU9V 1vJJDgCJnkDS0Tx/fKIwsoDz3HS1sy1ZyCplPO24ZBXDA3eHeeInQLo2thJeuuWsNJiu u5mht8+uHZ7aNGiJdtBvbCW0Qt/r3zurcdBZESmToyHhiwweSH8Qt7TiRAFzsJi0ZjgQ Xykg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=b8VojThl; 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 q4-20020a170902a3c400b0016d313f3d0csi533766plb.468.2022.08.23.04.08.28; Tue, 23 Aug 2022 04:08:38 -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=b8VojThl; 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 S1351118AbiHWJeS (ORCPT + 99 others); Tue, 23 Aug 2022 05:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350825AbiHWJcs (ORCPT ); Tue, 23 Aug 2022 05:32:48 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08DA07B1FE; Tue, 23 Aug 2022 01:38:54 -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 B21AE61446; Tue, 23 Aug 2022 08:37:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 72825C433D7; Tue, 23 Aug 2022 08:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1661243863; bh=YtjYNrgY2aCbWqM67G8OxeniAR3dUoUmn0JshvL67Sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b8VojThlw9yWwsOYXuZDvq6xkVIs5Pn5+1E/o8tlmzl1Oe2A1khmGJv8m0aW5RLb2 QDou+peHP52SenV3fkEBaZy12A9Jjhi86Ly5FTGZZHc1VmLjkwYyn2F0P4KEdXeK5w 4tjOugH24wWBuWxw8igAPfcarh5KkRPl/ACoz4qg= 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 4.14 046/229] ACPI: LPSS: Fix missing check in register_device_clock() Date: Tue, 23 Aug 2022 10:23:27 +0200 Message-Id: <20220823080055.305291010@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220823080053.202747790@linuxfoundation.org> References: <20220823080053.202747790@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 84b1d30f699c..faa83ff03674 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -396,6 +396,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