Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2450342rdb; Mon, 20 Nov 2023 11:04:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMxtsgba+tVG4Frnj5AChoIWESHjBp/yzmkkFs2Dxc2g8E2gbKR2r5fwZ4sb/72afD5EQV X-Received: by 2002:a17:90b:4b08:b0:27d:1051:83c4 with SMTP id lx8-20020a17090b4b0800b0027d105183c4mr6353881pjb.12.1700507056485; Mon, 20 Nov 2023 11:04:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700507056; cv=none; d=google.com; s=arc-20160816; b=syGAO6i+f/lslUuBTDxa89zPZ+OR3PNH7Dhk55jyPt/Fz3VIyG1pzEthgChzmNYi7p i/1/phlu2EBPt4k8kWzTWDHXXa+i0UuOy/r09yGosieMF1jqIBh06Es/v+i7BD6rZjd2 gCE+hVyKkSARGRlz+WREFRwE9zyTG/yIsvmzB9n+ASqW0vYa9I7LctJPgOlArXS2idYi Yo7mBHMlcKV242Z/wrgQR2CXa1z3o/F4Sl8CobN6K2myEWIg2A6nFewSXJQHgutkUs5M 5atekyBfkBUvORWOTMEq/txMGW6aTjGTNaUO8zU4iNtKy9xIegrVPb4nXBANbLJlpBFS y0mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=woHSGEV0kfn8EAviVtll1JBNiC0DH4Y1iZ+9mRED3qY=; fh=XVxuzW261ObcFKt6+FXoPD8Q+uGTo0jlfTIqmioiBQk=; b=ym9XUmegs7gAtMD9xBLhMNgUdWdFGctmHTB6Gq9IsFRCDo+pmOqmzGZneu8uDrAseI 3HAw4ouEi0rsIdgRnLER3kCa4LmsuLLFm9ZqMFfSJzSshg8JRFGW7quEsUU0UzYyfqdI EkW15kT9XlbkgfSgtGh3YdjnzJK3ja8ivvrmWEH9iEq4CPHYfqaYevlfNk4G/SawEz4X QQwCegQ6PGHb3dtezrDGXp0hAHaOB2zh3D04HZlILyg7mROHM7yf9r7QqTxUxzMfZs6N miEX1CAEVtp6MlpkGGNpPOBu7xIACwsQRBVeQwJfudccZkpu1nfCsCc7vSf5xyjuz72w 8ecg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ca1-20020a17090af30100b0028525af01bfsi2689008pjb.135.2023.11.20.11.04.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 11:04:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id B34CF803EC89; Mon, 20 Nov 2023 11:04:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbjKTTDx (ORCPT + 99 others); Mon, 20 Nov 2023 14:03:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjKTTDw (ORCPT ); Mon, 20 Nov 2023 14:03:52 -0500 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D06D2; Mon, 20 Nov 2023 11:03:48 -0800 (PST) Received: from [192.168.1.103] (178.176.77.202) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Mon, 20 Nov 2023 22:03:40 +0300 Subject: Re: [PATCH 01/13] net: ravb: Check return value of reset_control_deassert() To: Claudiu , , , , , , , , , , , , , CC: , , , Claudiu Beznea References: <20231120084606.4083194-1-claudiu.beznea.uj@bp.renesas.com> <20231120084606.4083194-2-claudiu.beznea.uj@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <2ac71d8d-84d8-2092-70b4-9ed21e78541f@omp.ru> Date: Mon, 20 Nov 2023 22:03:40 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20231120084606.4083194-2-claudiu.beznea.uj@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [178.176.77.202] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.0.0, Database issued on: 11/20/2023 18:48:26 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 181488 [Nov 20 2023] X-KSE-AntiSpam-Info: Version: 6.0.0.2 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 543 543 1e3516af5cdd92079dfeb0e292c8747a62cb1ee4 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.77.202 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.77.202 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: 127.0.0.199:7.1.2;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;omp.ru:7.1.1 X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.77.202 X-KSE-AntiSpam-Info: {DNS response errors} X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=temperror header.from=omp.ru;spf=temperror smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 11/20/2023 18:53:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 11/20/2023 4:24:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-4.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Mon, 20 Nov 2023 11:04:03 -0800 (PST) On 11/20/23 11:45 AM, Claudiu wrote: > From: Claudiu Beznea > > reset_control_deassert() could return an error. Some devices cannot work > if reset signal de-assert operation fails. To avoid this check the return > code of reset_control_deassert() in ravb_probe() and take proper action. > > Fixes: 0d13a1a464a0 ("ravb: Add reset support") > Signed-off-by: Claudiu Beznea > --- > drivers/net/ethernet/renesas/ravb_main.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index c70cff80cc99..342978bdbd7e 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -2645,7 +2645,12 @@ static int ravb_probe(struct platform_device *pdev) > ndev->features = info->net_features; > ndev->hw_features = info->net_hw_features; > > - reset_control_deassert(rstc); > + error = reset_control_deassert(rstc); > + if (error) { > + free_netdev(ndev); > + return error; No, please use *goto* here. And please fix up the order of statements under the out_release label before doing that. [...] MBR, Sergey