Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4258415rwb; Sun, 7 Aug 2022 19:34:43 -0700 (PDT) X-Google-Smtp-Source: AA6agR7bL+PXcRPzQZxVVN/o+iaVSRdTmBbH3F7ydLc8n7kxZGL67XzMGy30D5HHWmYXK0idEC0u X-Received: by 2002:a17:907:7396:b0:72d:a080:86a9 with SMTP id er22-20020a170907739600b0072da08086a9mr12182517ejc.49.1659926083119; Sun, 07 Aug 2022 19:34:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659926083; cv=none; d=google.com; s=arc-20160816; b=e92CvSg6vqZ+l1eWgMOSGmLLDZvl9sXf+JwtMBVa8KreVDkDNJrmDNcclOus3T0T9/ 2b3Wyj1DEkmTrqzArluUUkdkEhyvP3EHyEMK222SJ48VGHArxMcA8v3yXo0ftCE4IAYU 47/BOs5Dpvq4EDvsEHht2WJ94VNhz8pJsHge3BYo6czRPxdVCWTUHLFX3EuaFkBHd93S orjHC+sTDG5+4T1JMn5OTHTzFCnFpHmMthVY6SKh+/20lDayDshtXHMrw3krzN7KaukG or6SH3QX6rwyYirYJf96bkmDdxnVjQatQTU/XZBj/FD8STcawrQENqSIPBF9ox28UTVS pBJQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=0XVxdyXOqVCctiqDzDl5vsEwjjpq77lGq9DTzj2ET+s=; b=x0H34kFgRpFhPA8a/roJku+8zbvhIHTCqmxHBPRWHpSQ0cK+/tM2WbfJiik3r9n2QV BgsCHtB+VMjms632eQScwY6cUGk+KB3F2NGpzn0++yA5egOif5UhFHsGvCGULy3nulya TnHNmY9U8EUjQ+3AfvPUAzAYKxIhzJWun6pZ/klt8o4JE5A+7avB7hnsfw4nCfWHXHBo Mp1ulIpEbWo9atLC/FI08wl+5sooTjTAUWkXLb0NwobsOpiIlvGpLzXagv6dhAM7dwlL RVHYA1hsPEJqjjhl2fWjdQ+cu5MfnTjSlPKY4bR9UHwQh3PFhIuwfTNh9F64f4EzJGk0 sDXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NNs2i7H3; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q19-20020a056402519300b0043d4a5ee1a8si6474185edd.577.2022.08.07.19.34.15; Sun, 07 Aug 2022 19:34:43 -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=@kernel.org header.s=k20201202 header.b=NNs2i7H3; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241893AbiHHBgp (ORCPT + 99 others); Sun, 7 Aug 2022 21:36:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242257AbiHHBfV (ORCPT ); Sun, 7 Aug 2022 21:35:21 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1390FDF9C; Sun, 7 Aug 2022 18:33:09 -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 89B9EB80E06; Mon, 8 Aug 2022 01:33:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C666C433D7; Mon, 8 Aug 2022 01:33:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922387; bh=Sja0o4WT94abP/9yeowwf/8JUqSGSH1x3gwkaizUJp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NNs2i7H3BeDoO+dBCjXdXEQJlIIGN0UDNwnXVGd3ga6vmXkk6EVbwftkCX9KEDQnu nnIE537U53YunpF3NvjtG0LuSm/UKJax368CV2ZTgZxG4QEf9qihq4gVm6ESLfLhNv jUSMcpYrN6Ccp/odkB127knHhmUFhCGhCEpOqE+lJ9dmTW0hL1A/YHbyEBhFRY1Ewx ObV/9JTAuYNS3REH6htjgyZCGlE2xxvswzeSvSGbCDIlXQmyuxGNK2fBuqmhLJJcvp FcuQgcHxDJ4SNFuxsIKYlQDVG39H0eL+coIZt1+fYg1So7/mkJk31CMuligU0zHVt/ ntmRg3PrVpGMw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: huhai , "Rafael J . Wysocki" , Sasha Levin , rafael@kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH AUTOSEL 5.19 40/58] ACPI: LPSS: Fix missing check in register_device_clock() Date: Sun, 7 Aug 2022 21:30:58 -0400 Message-Id: <20220808013118.313965-40-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013118.313965-1-sashal@kernel.org> References: <20220808013118.313965-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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