[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<MEYP282MB2697C981F3370FF2C15491F2BB9BA@MEYP282MB2697.AUSP282.PROD.OUTLOOK.COM>
Date: Sat, 23 Dec 2023 09:50:06 +0800
From: Jinjian Song <songjinjian@...mail.com>
To: horms@...nel.org
Cc: chandrashekar.devegowda@...el.com,
chiranjeevi.rapolu@...ux.intel.com,
danielwinkler@...gle.com,
davem@...emloft.net,
edumazet@...gle.com,
felix.yan@...ocom.com,
haijun.liu@...iatek.com,
jinjian.song@...ocom.com,
joey.zhao@...ocom.com,
johannes@...solutions.net,
kuba@...nel.org,
linux-kernel@...r.kernel.com,
liuqf@...ocom.com,
loic.poulain@...aro.org,
m.chetan.kumar@...ux.intel.com,
netdev@...r.kernel.org,
nmarupaka@...gle.com,
pabeni@...hat.com,
ricardo.martinez@...ux.intel.com,
ryazanov.s.a@...il.com,
songjinjian@...mail.com,
vsankar@...ovo.com
Subject: Re: [PATCH v1] net: wwan: t7xx: Add fastboot interface
Message-ID: <20231221175332.GD1202958@...nel.org>
References: <MEYP282MB26975911A05EB464E9548BA8BB95A@...P282MB2697.AUSP282.PROD.OUTLOOK.COM>
Precedence: bulk
X-Mailing-List: netdev@...r.kernel.org
List-Id: <netdev.vger.kernel.org>
List-Subscribe: <mailto:netdev+subscribe@...r.kernel.org>
List-Unsubscribe: <mailto:netdev+unsubscribe@...r.kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <MEYP282MB26975911A05EB464E9548BA8BB95A@...P282MB2697.AUSP282.PROD.OUTLOOK.COM>
On Thu, Dec 21, 2023 at 03:09:51PM +0800, Jinjian Song wrote:
>Hi Jinjian,
>
>Please consider using goto labels for unwind on error in this function.
>Something like this (completely untested!):
>
> if (ret)
> goto err_md_exit;
>
> ...
> if (ret)
> goto err_remove_group;
>
> ...
> return 0;
>
>err_remove_group:
> sysfs_remove_group(&t7xx_dev->pdev->dev.kobj,
> &t7xx_mode_attribute_group);
>err_md_exit:
> t7xx_md_exit(t7xx_dev);
> return ret;
>
>The reason that I as for this more idiomatic form is that,
>in my experience, it is less error prone and easier
>to maintain.
>
Hi Simon,
Thanks for your review, I will do that.
Best Regards,
Jinjian
Powered by blists - more mailing lists