From patchwork Mon Jul 10 13:38:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 117935 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp5050207vqx; Mon, 10 Jul 2023 07:07:08 -0700 (PDT) X-Google-Smtp-Source: APBJJlH4qf9JIDJmNOk7SrqJ0uhnWIKFaWy/OmkDm/bpfgw3Ae5neRh5CFmm8akmPOT4lXx6YQJG X-Received: by 2002:a05:6a20:186:b0:131:f504:a5de with SMTP id 6-20020a056a20018600b00131f504a5demr1179285pzy.40.1688998028400; Mon, 10 Jul 2023 07:07:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688998028; cv=pass; d=google.com; s=arc-20160816; b=fo2/Hi4gR4R9aucI732EaQ7xBKnBroa9YNkrFb1QMX/+r24WAJtmUWZepCSk26ROMF jjepp9tsvZpSMfKLhnj18RPeMOsqUr21e7aAFNY46uDCC3H3JBEQ9QVLKuuMvqQLF5Np 1ubpN8PrYZGqScc3SMZo/bwF6CPh9Hk6SKfMaq0hfYbiV9oCFM+Kw9xI8ZFcwZ6IWi2x QxZCs8UYtIn7mqvVuUds+2Rmi1p3ukjUMYOojscZ6fVBii/aWj5kyjGc1cC7LkkNXIlk CZgh97c9eIt2Ekk1YifU0AkJ8x3cx4PZn0wrlyxnL1Kf0jrEnmpQtwXJANsH9H9/3jt8 5U+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; fh=9SSJfqESPsYcKa0W2RJ3zYVdUB+ri9KRxjhfugFnNW8=; b=wQ7+NTyTGuH+MQCbJzJ/qqHhqdt9tG4UBil6QlELSVh2AyM/MBzjT24ZIjk3FW91U/ tzuS6FnCzZAsggQmxDzx8v+qsJQqs1GYOVp3nLy0Hn7Xkfc9JN26LKC+cQrJuHUSbbCi 2JSB2EsZWRCJTjxUM7xuNn8E/LAmOBCkW//vDgJ5N+4ZOd/4k0V9PmY96J6jFVui7E3l afUEuGLnM/+AG9TCyrnbcfl0TDlVS1ChPW/EGzRvVKmGPINYpMJ0+9We06vBw45zuPP1 iTGAYJokcuy7USxCAwlUEBqqOF7nuBl4aLUlTiVWe5hmOjhvH00+CZMPVp/DPCrfpgr2 RIAw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b=QeFgz1bb; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j11-20020a63230b000000b0055adfd71daesi1914615pgj.663.2023.07.10.07.06.55; Mon, 10 Jul 2023 07:07:08 -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=@vivo.com header.s=selector2 header.b=QeFgz1bb; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232938AbjGJNi6 (ORCPT + 99 others); Mon, 10 Jul 2023 09:38:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232761AbjGJNiy (ORCPT ); Mon, 10 Jul 2023 09:38:54 -0400 Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on2116.outbound.protection.outlook.com [40.107.117.116]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42BE09E; Mon, 10 Jul 2023 06:38:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+cEvGl/3N9BoZ5lWHmYN/gQ1kvDZW977K2ZZbNeVbH7uLQV6zsBUSkvxbMjNfrzkTXTzXsuqeZINHGbwp+MR1J1WwDkVSKDKjRa7NfBf7pm8j9dzHFX3mGHgunQNeugmr9CvEiy3EnZIewPRnXHPJbUpsf4AlxU+jqufQQ0JgT8IaTdOBortykiUT/bEhmf8W0Lk7GQsrEcD/OpYPCzcF1tnIOus0DOdYsZEWKRtgUsdCsP5maNWjc7uJWHNLD3UlyX23AtPao3bSXf7ZnyQZogo+vwtphSTfrGjiIBkgw7RrHEt1BDPkq2k25Je33lHm/OMy22YFyvn3kxJWl/gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; b=ksZiVN+U/BqH/9emuAgogyrz9wpUBJImHDJvDPW1FLI3JdFDGs6QOOxNekI0FdkTlm4nrYPQ6F4MzUSbPAv/uQkzUomo/TZTcflsEo+dM59o66hxuoVaEJOPIh/6Xf54J4vPDiuDI0E4TYl7Ou3YqtXepPgx5q+V/9i8C5t0Dkx8f6JG++eByZp2e36SkvpuJ6OuPfzmv+pmE9sXPWFr5l3kVKmJ39GXDae8NOBQ9rEwY1ZrfJRmxeuvULdI7sxLvuLhMwWxO/hxba9demQJwql87qaiylCW+SGI8zpB69Ix7E3CxpLX84XGAv8vfV2AUyjB0KCQNCpiwejlpRURng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h7VzhSVCDtYEhHSCRlGff+uvbOUct4iHuir2pmvSfPM=; b=QeFgz1bbxrNJEvaUu1zSgiqZXs65HNNWM+wDXEGYHC2Wz95dSIGt+14W9wW+M5I9GDEvxN63lR0EG06eJjfQVHcgXe/oUZyykcvAnmTej2/lco6BhuuPXO7md8Y77rX1NmgbFQCrADqAvFzUqTT6QeT+nEyzE09PRwVCcKlqTA0UBWleCH50q3c5V4ag3leWyjUbExr/RjtQbMI0oQHu5Ax4qJ/y7LYD1TXGoiC3sD1gfrj+O2b67x09KlFqhvln0X0iBe7CdNEOG6n6qLEgiJr9fA9ESli6cvIQG2I8t1yQlcS4pTnYTC5r4p6LbdxMTBVxyJUklVatxFqmsayvig== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by SEZPR06MB5691.apcprd06.prod.outlook.com (2603:1096:101:af::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.30; Mon, 10 Jul 2023 13:38:46 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::fa0e:6c06:7474:285c%5]) with mapi id 15.20.6565.028; Mon, 10 Jul 2023 13:38:46 +0000 From: Yangtao Li To: Moritz Fischer , Wu Hao , Xu Yilun , Tom Rix , Alan Tull , Greg Kroah-Hartman Cc: Yangtao Li , Moritz Fischer , linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] fpga: socfpga-a10: Fix incorrect return value of devm_regmap_init_mmio Date: Mon, 10 Jul 2023 21:38:30 +0800 Message-Id: <20230710133830.65631-3-frank.li@vivo.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230710133830.65631-1-frank.li@vivo.com> References: <20230710133830.65631-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0048.apcprd02.prod.outlook.com (2603:1096:4:1f5::11) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|SEZPR06MB5691:EE_ X-MS-Office365-Filtering-Correlation-Id: a2ea1440-c5b4-400f-aa1c-08db814afc23 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UWwYlIa65jARA7dQEe2thK+PJmyY5Thybxz041NIpNo8xPdRjiRDKucqfRMh39t30FF1mFDOw5QTqWvmWdG3JV0WgXdf14UjbK/ZVRKm1AYrC8UPhmJqT8Wu7MLf1TY/llkTHnFxpWBQ41xXW/yungjcvwlgPGD6A/RDWauYfql26O9kD9W+yffk2eyU8FlwzAmLM4auySejcCN5BCVuAGHsni7l1p/OJMRdEMTbnlb1aUlrcy77UVTAqKMdbCvDNAw7lyiQT2LRQo3HB6jZbImg2VEsdQ1BJzoJNGSf/jUHcMk8UX9tMOulz3GWK0z/ZGoekKQhNsO9r/kDSj5xqMQc6AGOLccQZ19tphtsw0BE6+8JxhHahjypeMyPHdTet9FDBirBNI/XZi4LpmMmFfYaM3jgA7fCIMWqxFiS3nqe3XNKXIjMrTGeZr/8nT72Y9rQh22KWc5w0O7jvsEJKMC1wtTcO915pbY89mRplavjjyW5TzEQ3i4oMGVOV34Jqwc3/toTqeeTEHvl5QgJVat6G2+OgGI96FhXGPbk+GK4JWKvyNdvpr3XIQTnis80q4YqY77YJ6+aCA8jqsXFVuUJDR1Ir4m+LedhQPH566/57qcK9UADpGZ8YnMe95EG X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(396003)(376002)(39860400002)(136003)(451199021)(86362001)(38100700002)(38350700002)(36756003)(6666004)(6486002)(52116002)(110136005)(54906003)(26005)(6506007)(186003)(6512007)(1076003)(2616005)(5660300002)(2906002)(66556008)(316002)(478600001)(66946007)(8936002)(66476007)(8676002)(83380400001)(4326008)(4744005)(41300700001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RYK89IMncJL0x7pOI/YhHpKXf90UqYI5YYRK0fga0cwilwJZVftCKS27GevNfaXJvVwLr3Vot6xBOVCAyNmL+OHakaZtBx5QsxMIV9sPJw1IjKzvpijjrTK7FgVu7uywtZ8gFL0xerIdV3Y4ImVxieXjW1E83JacD6XJCkFY5Y5gP/iSdl6qGXEJtdnmgj/zYhtUczElSuTGSoZoQAIHd3wVVvZuhHY08o4flW5q/ZjeRlJ2Gej7+WZCpROoVlMvQe/e32Kl0as41QOXAEzrNT6wQ5Dc8vFD4T8JhV5zLRhLD0H3cZSgLosZMK/q4dXB28jHraoIPxNS0nRaeY5bD9UWjAAz4Mu85Ee4PwODB9bhXj053VJNcki5TlmJDhFmF5GXcjIF2qvy+EeFmaN9GrFUrKedmROEquPR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A9jFoEVaFSu9X0Lle4q3Rtzfyyb4ybW9TQSKp4OUzPDz1hAQyJjAdcdoT0/EV8Bd8AELQmgHwCqjkz5oqAPtmAnfC/kBNw5aNmnoOFw1Tn2h X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2ea1440-c5b4-400f-aa1c-08db814afc23 X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jul 2023 13:38:46.2885 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: zN13aynZKfvenEymh0X8wn0vt6GnKQo+igqRuNp7tm1uK2lVVqTQLNie2+fDbzNMLWu1Qbi+mjdQ+yPWuEZq6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR06MB5691 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771042796579498713 X-GMAIL-MSGID: 1771042796579498713 When devm_regmap_init_mmio fails, we should return PTR_ERR(priv->regmap) instead of -ENODEV. Fixes: acbb910ae04b ("fpga-manager: Add Socfpga Arria10 support") Signed-off-by: Yangtao Li --- drivers/fpga/socfpga-a10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c index cc4861e345c9..b7b6e0bdb3d9 100644 --- a/drivers/fpga/socfpga-a10.c +++ b/drivers/fpga/socfpga-a10.c @@ -491,7 +491,7 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev) priv->regmap = devm_regmap_init_mmio(dev, reg_base, &socfpga_a10_fpga_regmap_config); if (IS_ERR(priv->regmap)) - return -ENODEV; + return PTR_ERR(priv->regmap); priv->clk = devm_clk_get(dev, NULL); if (IS_ERR(priv->clk)) {