Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1857937rwb; Fri, 19 Aug 2022 10:32:36 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cDFx8GAnEQKTX1Z6/zbOU15LieLBacbChoqWhrkWGciye1TPZ6edP8agunho44piuZ6PO X-Received: by 2002:a17:907:9810:b0:73c:37bb:c4db with SMTP id ji16-20020a170907981000b0073c37bbc4dbmr4357613ejc.79.1660930355683; Fri, 19 Aug 2022 10:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660930355; cv=none; d=google.com; s=arc-20160816; b=NxZ+cdAXWN1k6T2tz5BCEihotSlam2Eve4q20Q/aA05/McakF7CdVEEw55DnXHh176 SM4p0KFR4YGQY7gUf7zV+LkvW/X9ww2pbvrc30rHytWyS19GI87us97CEAM9gTf+BPdS u63K+S8jwj1nZ2r9AZCRiTpEr4jgF3L5zrsn6ovfaiOEW9LrvdTxpttlkF69FJXwrZLK HjQW908sZJyEOOOCiLjSaaKmY5OEGU4GRkqW8WbEPwRmRJq0IBVRogs5AYKRoSKocBVZ YYB9JC8eVU99gGLA3tCBR3ViBoLAIICZ5b9J9RbfDEWf644U4qtfJkxRRthlHnlRNbV8 Ig/w== 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=f0ec1eKrcxk1bw/TMvubPITCtejsAjkd7PE/rEQqjEY=; b=pWUVnw7VbYg4kNdiMVac6mZymhCT63gF8j6FdNAeeqrzQkLB8Ggzr1koCOPiAXeNvA qnIVcJocBDrxyHQuBGJOQN6eo9xXYu8KXeg8iACfwGe9CizGhf+x0xOJARVGkpeVLumv motF7tIQqPMVshlvsA3Gh0WbSN+NznCNrFnEKTtmXm463BilBBEC2iNKEQW9vlmZDseQ +6PfWs7vO2AAA2v+B5eDSEQhI/rtDeBWOsr7wxtD6XRQeNfvQ0itWM4gdGrnbF+157Dj sJIMQQNsX6o3HbnzXvzYqtqFj4IP73pRtsUcHMDz/1fX1L3XiO44bBEK6Z+gi1oElQpk z3mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=f6poeTL3; 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 wu13-20020a170906eecd00b00722e91c126bsi3910341ejb.55.2022.08.19.10.32.09; Fri, 19 Aug 2022 10:32:35 -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=f6poeTL3; 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 S1350742AbiHSP5d (ORCPT + 99 others); Fri, 19 Aug 2022 11:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350800AbiHSPzq (ORCPT ); Fri, 19 Aug 2022 11:55:46 -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 6D62B104B0A; Fri, 19 Aug 2022 08:50:23 -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 0A87E6172F; Fri, 19 Aug 2022 15:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1316EC433D6; Fri, 19 Aug 2022 15:50:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660924222; bh=j4raeIPO+v/GVza0FDa/F3rO28yeJBfDMmfX2uRbR4U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f6poeTL3r/brm49TfzxRoNaMqlV2wmeQGabUrin4+Yi0sl1FHV3pA7kYZq13xEdwo kGeXpdsruQok/nplV/PIBV4IPuRBxc8h8kzHGYgcNGvaqVk7MKu+Iw5IyWVbM4GkXC L0Q8VeCu+vo6xTZ26uqqJsb0KZMXGpQ+AbcE5/MM= 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.10 098/545] ACPI: LPSS: Fix missing check in register_device_clock() Date: Fri, 19 Aug 2022 17:37:48 +0200 Message-Id: <20220819153833.668865120@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220819153829.135562864@linuxfoundation.org> References: <20220819153829.135562864@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 be73974ce449..6ff81027c69d 100644 --- a/drivers/acpi/acpi_lpss.c +++ b/drivers/acpi/acpi_lpss.c @@ -401,6 +401,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