Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5894092iog; Thu, 23 Jun 2022 07:24:43 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s0ZkgqrCgOwuMXAQ9JiyUDczaN2O16TOAeG4sn4JKXrOMpZZ7rHBE1DXBpNASrxFKj4HW4 X-Received: by 2002:a05:6402:500b:b0:431:78d0:bf9d with SMTP id p11-20020a056402500b00b0043178d0bf9dmr10703709eda.184.1655994283009; Thu, 23 Jun 2022 07:24:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655994283; cv=none; d=google.com; s=arc-20160816; b=U6eqC3CBkqQCCDXQGg6fvBBLl8EAj/WMWKD6EcrX2WNYkbnS+MMQxCuOaA4aWMP6lo E8ivnCLlH0W4Nm2qLlmuO216E+u8AE0m7RHoShJDFla/h1ZC9cHyf9fzTrSwjDAmtd/E zB72KkT1gvFNiwmvjB+DlUC/+8hOFTCnS5ZkpKSe6gu38E9D9KZuGLa1BpPUW2Jr5Ftx nJM9r/8W547OSyBVkk76gSZpLa7vX/CDLjxOj1hxVKXP78j1ut2exi9b63CBC2cnHAA9 9l31TURi91cQjJQbTXA/zA6JfOKLUUIhESGZs0hS2QnYC2svQ8NGlk+fV7/ZNHpEi0X/ LQkQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=YzLWjFH8JUhO6LUNmgSCyovPzdzhMNp9p6VW4aUFODQ=; b=sxo4bvZDV+UWlYcJSUFnXZrkEP7uiE1Fnlx78IsH/L6FRmXOmpIOYwBtsYrLoerJ0Q 1OoUz7wo8oLHZppc497pD44cni2q3REKzwiCYoFWCgHGJ+jnDeIXTptgxfugOuCsrfi7 CUDW56XgzZroC77r9MUmR1f3rERb4H3H5nxtJDSEE0UTg6vkDdtWE7WVoxlG+8FUf8Yn NTlWrUuvyfxGKz2qTa2wMRX8dYDKDE/cEyqAhzAHsqaXIbT6UUs2t/ZONQYEdYwsdM49 PBt4xp2pSqN+JTWqHQmM8wKy3iWi37f7tI19EUEdtNPld7nFekoSGwEfE3BWu9mIfenC BmGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=pOGg5PWM; 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=163.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qk14-20020a1709077f8e00b0070ec2b05f5esi26235339ejc.490.2022.06.23.07.24.16; Thu, 23 Jun 2022 07:24:42 -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=@163.com header.s=s110527 header.b=pOGg5PWM; 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=163.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231571AbiFWNV3 (ORCPT + 99 others); Thu, 23 Jun 2022 09:21:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230420AbiFWNV1 (ORCPT ); Thu, 23 Jun 2022 09:21:27 -0400 Received: from mail-m974.mail.163.com (mail-m974.mail.163.com [123.126.97.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4F1C249C8C; Thu, 23 Jun 2022 06:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=YzLWj FH8JUhO6LUNmgSCyovPzdzhMNp9p6VW4aUFODQ=; b=pOGg5PWMUFcMXdSw9EDcs fzpd++jNGevoWEJTaNUfilc7wi65hv/F+EkmrBa8J5EALxCocXQpxUzJFlEEJvmt chqsE5Qp6ry2qBgIqkRwc2pQ5vMrMPBFL4lBbRhPVtmOg4DZyHtJbh13M4iaH3oE sZPKXaAoptFFAMX9ckY4FM= Received: from localhost.localdomain (unknown [116.128.244.169]) by smtp4 (Coremail) with SMTP id HNxpCgCnbvrHaLRi0YWjKw--.7486S2; Thu, 23 Jun 2022 21:21:12 +0800 (CST) From: huhai <15815827059@163.com> To: rafael@kernel.org, lenb@kernel.org Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, huhai Subject: [PATCH] ACPI: LPSS: Fix missing check in register_device_clock Date: Thu, 23 Jun 2022 21:21:27 +0800 Message-Id: <20220623132127.1248462-1-15815827059@163.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: HNxpCgCnbvrHaLRi0YWjKw--.7486S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Gry3Zr1UWFyftF43Gr17KFg_yoW3ZFb_ZF Z2vFWvqr4kKFn3Cr1DArnxZry0vFnI9rs5XryUKr4xZ348W347WayrZr4qvF45Ww18KFZ8 Z3W8trW2kr13CjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUbPl1JUUUUU== X-Originating-IP: [116.128.244.169] X-CM-SenderInfo: rprvmiivyslimvzbiqqrwthudrp/xtbB0wgphVXlvuBXHAAAsS X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,FROM_LOCAL_DIGITS,FROM_LOCAL_HEX,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 register_device_clock() misses a check for platform_device_register_simple(). Add a check to fix it. Signed-off-by: huhai --- 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.27.0 No virus found Checked by Hillstone Network AntiVirus