Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3491647pxb; Mon, 4 Apr 2022 18:41:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwq9wGPo/3sFX6yyvH3ZXh2Agq2B2WVNTnx2w1wOZjjXd4Hb3iI+X3xionEejGbpruz0pUj X-Received: by 2002:a17:90b:4f81:b0:1ca:b362:1524 with SMTP id qe1-20020a17090b4f8100b001cab3621524mr1321753pjb.114.1649122915780; Mon, 04 Apr 2022 18:41:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649122915; cv=pass; d=google.com; s=arc-20160816; b=FVVpszyjXNNeIj5SIBonL2aD/vjrxlYrWmEEgug+eBxfxtZxaeoVDm/ufQRt7orsYL NtiOkiuBfY5+qWihcGOkj2WOvWn7fUQp48rvsM6/aKnGWArSxQSCy/43R/8fhTdr9ZSK f+3abY2vloxhuAFhY5X42mbenehFasQBjjLdzVQSjzB+D9DLz1RE4nBLA0XpvmvakPF/ koQ566M/89zMECFHv6spbyuGM+n8ufzfkHSsLYG3zrEy7fUFGUslVwneX9/A+WGKM5D9 DS2yf9NkaHGI1xeEgg8Mc3mRZR1w2DigTA49nIUo8CeGhhYZlxe6o7bn6l5Ofko0uqYb vO+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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=NyD2dEX7H0sfudCrKoeJATj/UlcwLm5YmQ8vGy67Oug=; b=npxDDFC+dLEiFuqx5UYAA5pTLXeOtjnEbfQPjYEtZk7kyFg9fjTXviYEQ280ESPPlu rwGjABfRvIHBmhgMJUOjYftmj7ShqSA4J6CF2j23JVP1e/MlZ7qkcjXrvQZ9nF0v7U9Y nN1PoMaZ2fxEuyCTF2A+9HRYsY0qQ558eOBqzQoGv5n0j6fqbqa2v/+QpLoUon2wZci5 0PQYaBDc4vPJQNw/LxzQ5pVUj0qhTy4a5KRK28Qp0yREdNKZZW9Vo5N6tc1pnme4gly3 aSRjVFubxuEi2FBtvwKs5tDiqQcANMBWBwGLApAHGpIzfsXEO0G7jt5X1DPrP+4qLxPK ZCjw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bp.renesas.com header.s=selector1 header.b="aAcP/F8A"; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dkim=pass dkdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=renesas.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id j15-20020aa7800f000000b004fa849f7ed6si10378303pfi.243.2022.04.04.18.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:41:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@bp.renesas.com header.s=selector1 header.b="aAcP/F8A"; arc=pass (i=1 spf=pass spfdomain=bp.renesas.com dkim=pass dkdomain=bp.renesas.com dmarc=pass fromdomain=bp.renesas.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=renesas.com Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D2CBC28B120; Mon, 4 Apr 2022 17:39:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382347AbiDDWJV (ORCPT + 99 others); Mon, 4 Apr 2022 18:09:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379772AbiDDSEN (ORCPT ); Mon, 4 Apr 2022 14:04:13 -0400 Received: from JPN01-OS0-obe.outbound.protection.outlook.com (mail-os0jpn01on2122.outbound.protection.outlook.com [40.107.113.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F31B37BCA; Mon, 4 Apr 2022 11:02:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IEuUpuKsvbm/BsfqoybsH6EJyC0bUZK/DD37LZHyXWBGsqYSkuDNe3s7lGoL6EfjM8jEwLnuyBoBBM/hnxtlcRdHYh7m5qZ+Pd2iuZAio5UzNOLf/f/Lg5Du6MqD1lz4bJY8YkHDhTUB+2AEKJ4CQsMf2jBmiFJ1Zg5Dw2wRAJ1/1bR0Nh+Bn/AP7eKg2GjhP1oB89S0krsTjaSpWybE9eZC7a6qvJ/w9Xq52OkSEAFyDwrY8+1cp+ds+iOIiIG8jbN7dCYrAkbtcYc1plTs7/cq3TZuOWDudPuEkzxPBJfbzAq43YN+zXB7EAaH6fLvWXZmldHi6UCJMeIV9Ayt4w== 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=NyD2dEX7H0sfudCrKoeJATj/UlcwLm5YmQ8vGy67Oug=; b=V5KjXz44YHGr5JuI8HPp+a+EDPGYLE1Akie0zVbw4S43as8j7+xsvz6qSoavX9WtwwHiNOWs0EKvSHTXtbnQBqngTom0qyBTDRIKDSmpx25t7SsafAX4L3CHRM1lUP6VocLfV5JH06X1TtKE8b2QKJaPjCXgqCmpVdGQBzf1o2MNu4Qqyiy/3s1O86upFU6nsPb9mZ4HY/p3hgl62M2hPWN0W+Q6uhCN1j7I5zzabDJderTDtHkSXUYnlNKePASI0tHBwbLP2RN1O93b23S91ZlI6G39Y67WlaGKBED6DB6RappxFZQNcWBK5vWz8szY5Z6LF1vDANeSbQFlxGsqhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bp.renesas.com; dmarc=pass action=none header.from=bp.renesas.com; dkim=pass header.d=bp.renesas.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bp.renesas.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NyD2dEX7H0sfudCrKoeJATj/UlcwLm5YmQ8vGy67Oug=; b=aAcP/F8AyFcvPP8U50gDkI5lCKGMoQ5GjC+BQaMfVMldFnNrW1Aldc9rPchJof3WH6TpARHKajAmZ+4KESXFvY0/Dihh1dvYFMvrg+CjWq8rnaeq4JbHiS7mu0svjGmSLwzPGIOGW7/vSu9W6MCnyETG6ymOMdQB86X8sV52BHg= Received: from OS0PR01MB5922.jpnprd01.prod.outlook.com (2603:1096:604:bb::5) by OSBPR01MB3111.jpnprd01.prod.outlook.com (2603:1096:604:22::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5123.31; Mon, 4 Apr 2022 18:02:11 +0000 Received: from OS0PR01MB5922.jpnprd01.prod.outlook.com ([fe80::7ccd:4eb0:e2ae:fca8]) by OS0PR01MB5922.jpnprd01.prod.outlook.com ([fe80::7ccd:4eb0:e2ae:fca8%3]) with mapi id 15.20.5123.031; Mon, 4 Apr 2022 18:02:11 +0000 From: Biju Das To: Prabhakar Mahadev Lad , Wolfram Sang , Ulf Hansson , Philipp Zabel , Yoshihiro Shimoda , "linux-mmc@vger.kernel.org" CC: Pavel Machek , "linux-kernel@vger.kernel.org" , "linux-renesas-soc@vger.kernel.org" , Prabhakar , Prabhakar Mahadev Lad Subject: RE: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of returning directly Thread-Topic: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of returning directly Thread-Index: AQHYSEjXOMLpIeOQFkaJsJDtWSjZC6zgCvxg Date: Mon, 4 Apr 2022 18:02:11 +0000 Message-ID: References: <20220404172322.32578-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20220404172322.32578-2-prabhakar.mahadev-lad.rj@bp.renesas.com> In-Reply-To: <20220404172322.32578-2-prabhakar.mahadev-lad.rj@bp.renesas.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=bp.renesas.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ea0e63a6-e346-49a7-7e48-08da16653e24 x-ms-traffictypediagnostic: OSBPR01MB3111:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eGOnNm0ZJpCxIO5+gABe7p1G57hfzuNGFNg0Ypou+MTKxf423MlLENv6axGNjFAHLuMV0RrRnTCIcfQ3EdWPihO7JVWdFoJ6XRjO98snv69QkFMCU/xi8lKPGaCvbh/Ozth5sR1Kg+Pz0f7iB3okzNPcXQSyxIKyoaHufExRugd4T6rBFQ3yuDMdxNWDgr5+eHG6u5oGi5DgsbgJBBksEYPvvu125SG4buL8voSp1igvgk2SCCR+PR7OJ0zKmYrZmsyXZWvlwF6P2SP6cwhEOlMmaxw5Md2SIOsxoNW/4sW5lq2RwX94kDuRDj/LVnQKQaOHwDPDh8M8+usxHRwAzTA6T8taYtbdkTt/Op+yf/GuA0V9j93OIlSmh9M1vYVAiJ4EBdWukGw0QjaAoKRkTIOOZjWQ3HzscLaWeBO2gtDnjyKI8uHt7EG96J7bS7wN7kcvKY+WBaru+59WhSQscNzPCIkKEigCEyo63EjqCgJ1RAnd28XHfbzVzofe2apOlfgZCbXdN+w2kx7Yj5xl71/RIC9dA3CpOZ0nv3MGBSKySX1bK+WnbO0r5gGRCw7ubt19fyDnFBGhjKZLwqAAEI6iEDXDQX4gEui6uI2IQ1gde4bKtr8wQUwm2XzS1dVnm0G1Jot2hkjAPXwwnovCo/HLm/23ElMmPwReB+S/8X1dJuYl3qUJKQI0J1Vp87a8HIlxqu19UdpmsqjB4K0B6w== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OS0PR01MB5922.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(66556008)(8676002)(66476007)(66446008)(64756008)(38070700005)(66946007)(76116006)(186003)(9686003)(4326008)(52536014)(26005)(71200400001)(33656002)(5660300002)(86362001)(55016003)(8936002)(316002)(508600001)(6506007)(2906002)(7696005)(54906003)(107886003)(110136005)(122000001)(38100700002)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?3wzS2Z4iHIV/s+497eB/qe1Ipg6ton+g6/pZGLzjKR3S4nq6MscTN577UIQm?= =?us-ascii?Q?rmbC2wB/t8qLoWMd3x0dUhAdwRygo1IX27a9qjfdsB2zQ3BY5VHDzh/LahoG?= =?us-ascii?Q?G7QbYV+teSQTjWbt/i1rKc+wXu1cU1jQE3NI1wscUIRJtNNji1Tp8TnBiFtH?= =?us-ascii?Q?SnLpirOqANVhjkanlU3er3Ct+ACaRlcIoaq3JOMWxdQhtDidLZsvHGZmeti6?= =?us-ascii?Q?H6xdIjwi3+cpu7EfqxD06zjXDWWEM5yCuY/a+fo9bLx9UwNBWcWethYMvwNp?= =?us-ascii?Q?6lQLcBb60NLudfzR8zM8nJVLxoauqYdM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LMeXQMo4n/b02iIbyrhQOhzvmkrQTCwB+dBe8uCu1F0bn?= =?us-ascii?Q?5jWNwkU9CeJewt6+Htxqa53fnToieqvSJak0M17dUd5U/RsFYXtZdj4FXeiQ?= =?us-ascii?Q?Hd/Sz0KKTYn7W3jxNQqWdyCLoPA39cptmDvv4BAp5RreKVXrc8ZKxJu0uYjd?= =?us-ascii?Q?yynVRt84faJn9ReU54JrxNtSOEEvRnIUX4M/b83zC84IVQ80rlkf7yf9yf3D?= =?us-ascii?Q?5Pnn+wX9O3psJtzasOCPkevdP3ojUWqD/ohBiA1MOuVgJfANNZn4CO2o8yQl?= =?us-ascii?Q?6kp+xHylUWV+x1GAhaV2Vy3iJcTnD4CQD45on1iBBOMpUuF03I6Gr5IrY9qb?= =?us-ascii?Q?fTDh0TRYomsZFhp2YOEBqM/4OfSW1T5qwETAR4yBWHNoXGDWb+oIZIertS9e?= =?us-ascii?Q?q50iBoj9/4dgrKM3loUYTcrsEd0x2giUHTKBXXqsUcw2IbHOYddAM2R7rdo9?= =?us-ascii?Q?vBsKvTtLZc48NzcYhjN36u22DAG+lnkr50N5fTZ3FZqD/xaeKozAg/yee3Z9?= =?us-ascii?Q?qSKUm7pO+ohU2Hdun3kkVBLGlAWpWX0=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: bp.renesas.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OS0PR01MB5922.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea0e63a6-e346-49a7-7e48-08da16653e24 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Apr 2022 18:02:11.5965 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: S28CsCuqLN9UQAgBYeyAC0V9D7AfP8rOsUu0203C+Pt0t8K/H3eoesXvVe+FnBIFqpsS4nyOqteqXGQZVX4jbzEjZDJIpOHi6gq4cmMGJP8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSBPR01MB3111 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 Hi Prabhakar and Pavel, Thanks for the patch. > Subject: [PATCH 1/2] mmc: renesas_sdhi: Jump to error path instead of > returning directly >=20 > Jump to error path "edisclk" instead of returning directly in case of > devm_reset_control_get_optional_exclusive() failure. >=20 > Fixes: b4d86f37eacb7 ("mmc: renesas_sdhi: do hard reset if possible") > Reported-by: Pavel Machek > Signed-off-by: Lad Prabhakar > --- > drivers/mmc/host/renesas_sdhi_core.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/mmc/host/renesas_sdhi_core.c > b/drivers/mmc/host/renesas_sdhi_core.c > index 2797a9c0f17d..cddb0185f5fb 100644 > --- a/drivers/mmc/host/renesas_sdhi_core.c > +++ b/drivers/mmc/host/renesas_sdhi_core.c > @@ -1033,8 +1033,10 @@ int renesas_sdhi_probe(struct platform_device > *pdev, > goto efree; >=20 > priv->rstc =3D devm_reset_control_get_optional_exclusive(&pdev->dev, > NULL); > - if (IS_ERR(priv->rstc)) > - return PTR_ERR(priv->rstc); > + if (IS_ERR(priv->rstc)) { > + ret =3D PTR_ERR(priv->rstc); > + goto edisclk; > + } Why can't devm_reset_control_get_optional_exclusive to be moved up before d= evm_clk_get? Cheers, Biju >=20 > ver =3D sd_ctrl_read16(host, CTL_VERSION); > /* GEN2_SDR104 is first known SDHI to use 32bit block count */ > -- > 2.17.1