Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp1870962rdb; Mon, 9 Oct 2023 05:50:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEy3qAF/z6QJ+gH5524juPbp+1dFrXNa0Iy3rdXC406WFX8m4+lTSngfezS5Wr6hicgPxbD X-Received: by 2002:a05:6358:98a8:b0:140:f00a:ee2c with SMTP id q40-20020a05635898a800b00140f00aee2cmr19222319rwa.11.1696855847239; Mon, 09 Oct 2023 05:50:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696855847; cv=none; d=google.com; s=arc-20160816; b=Nt6KZwJMbl/2fMQSCsZYda5FgvDrCvbEffAxKs0EzpAMN3Nb0aRWrPI6lmoo4ceExg C7QZl4yZZTWX/ODPZ68Apir/JGjylf9GAeSwvmFehtTp7dJD7rL/gH7/5Bi3CkLNxxDL nNhy8LczXz/lfzy0gQ2yZcUhVDjQ7OaYcjIXIl/GPE3f8PqBEE/CHVS6yjKr3zXu0XSJ tdepMS0RMiKwz4nSJaZJGIcDj8+vTeMYaGfQLO39SZlXdZhepNU7prIESn9WBhSrKzvX Mso6cTiZ4ul9awKC+BEUTljkUd95/auSgGFo3Ee0QWpmPolIpqD2nIL/VJVKQUcGQymN rbzQ== 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=KXXreBVQdXZOPq21+dI2Ub8P0pQKFmcLRcl/V0uA8iQ=; fh=sid8UmHUAKvWTbGgYgy451zQQWyekXz0REvNLkjluQg=; b=VlvVq+RAYdMhmKiclLsbnLwgLCWzzwThJeoVoy1qCPCr6sUOWaV6UxZdD+jQpXjife 318uPj35ygvqB3u2e1SVm6VwK4E7HaXw1oDTUv+TULg8HrH+sMhxe5TY0TvF0MLYnmk+ DDIPHt+PMIeRlUUFD4QpJM1X+EDqO6o279OjFqmFLvLmwCX4kMPZCykc1DypQsAKPXip FMgWrTyMcOM1oQluS8e8z15xswoc8lklFnPDOoVdaRfb7sIQ4JVhmgKCeSWqK9iMw/aG /15C2AnVYZM1ZRoBqnNfKvVVGp1tVC6VWJKl2Vc995wFK9euJcFYMfc0ajsFNeLR13eN eW/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=mF2TVrA4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id w67-20020a636246000000b005898db9d676si6904331pgb.260.2023.10.09.05.50.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 05:50:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@163.com header.s=s110527 header.b=mF2TVrA4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=163.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id AA012808D281; Mon, 9 Oct 2023 05:50:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376608AbjJIMuf (ORCPT + 99 others); Mon, 9 Oct 2023 08:50:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55144 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376584AbjJIMu1 (ORCPT ); Mon, 9 Oct 2023 08:50:27 -0400 Received: from m12.mail.163.com (m12.mail.163.com [220.181.12.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 89D3A8E; Mon, 9 Oct 2023 05:50:23 -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=KXXre BVQdXZOPq21+dI2Ub8P0pQKFmcLRcl/V0uA8iQ=; b=mF2TVrA4nV5zi2oqQhR8a cSiUNotrGUBi0vUv7sjG6fK38SJwumPdkJPf/VGvYoOg/Dg3O60BnZRodrZ0j0EN htK6bnKWFnYgI4vjchlkGVIpHQBJG5YXXl8gpJcMg3msFxq1stQ1ySrXTrHJOPgl rJfwG3gpca6gt1DFuFJ1d0= Received: from icess-ProLiant-DL380-Gen10.. (unknown [183.174.60.14]) by zwqz-smtp-mta-g4-3 (Coremail) with SMTP id _____wDnD9D09iNlFqBXAA--.35653S4; Mon, 09 Oct 2023 20:50:03 +0800 (CST) From: Ma Ke To: dlemoal@kernel.org Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, Ma Ke Subject: [PATCH v2] ata: sata_mv: aspeed: fix value check in mv_platform_probe() Date: Mon, 9 Oct 2023 20:49:55 +0800 Message-Id: <20231009124955.4046988-1-make_ruc2021@163.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: _____wDnD9D09iNlFqBXAA--.35653S4 X-Coremail-Antispam: 1Uf129KBjvdXoW7Jr4rAw4fGw18tFy5tr17Awb_yoWfGwcEka y7urW7Wr429r4Dtw15Jw1ayrZ7KF4vvrsYvas2yw1ayr17Xw43XrWDXwnxu3yDWw48XFy0 yr4UC3y3Cry5GjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7xRtoGHUUUUUU== X-Originating-IP: [183.174.60.14] X-CM-SenderInfo: 5pdnvshuxfjiisr6il2tof0z/1tbiyB0EC1p7MEUB+QAAs2 X-Spam-Status: No, score=3.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Mon, 09 Oct 2023 05:50:42 -0700 (PDT) X-Spam-Level: ** In mv_platform_probe(), check the return value of clk_prepare_enable() and return the error code if clk_prepare_enable() returns an unexpected value. Signed-off-by: Ma Ke --- drivers/ata/sata_mv.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 45e48d653c60..df3a02e7a50b 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c @@ -4125,8 +4125,10 @@ static int mv_platform_probe(struct platform_device *pdev) hpriv->clk = clk_get(&pdev->dev, NULL); if (IS_ERR(hpriv->clk)) dev_notice(&pdev->dev, "cannot get optional clkdev\n"); - else - clk_prepare_enable(hpriv->clk); + else { + rc = clk_prepare_enable(hpriv->clk); + goto err; + } for (port = 0; port < n_ports; port++) { char port_number[16]; -- 2.37.2