[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <efce3a4c-4480-99f5-0229-a44009ebe9d8@nfschina.com>
Date: Thu, 28 Jul 2022 08:28:08 +0800
From: liqiong <liqiong@...china.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
yuzhe@...china.com, renyu@...china.com, jiaming@...china.com
Subject: Re: [PATCH] tracing: Do PTR_ERR() after IS_ERR()
在 2022年07月28日 00:28, Steven Rostedt 写道:
> On Wed, 27 Jul 2022 23:35:19 +0800
> Li Qiong <liqiong@...china.com> wrote:
>
>> Check IS_ERR() firstly, then do PTR_ERR().
> Why?
>
> The code is fine as is.
>
> -- Steve
>
Hi,
It's all right, assign PTR_ERR() to 'ret' anyway.
But this assignment is valid only at the "IS_ERR()" path.
Maybe it is better put "PTR_ERR()" at error path, keep the code clear.
--
李力琼 <13524287433>
上海市浦东新区海科路99号中科院上海高等研究院3号楼3楼
Powered by blists - more mailing lists