lkml.org 
[lkml]   [2018]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] cgroup: remove incorrect check on the return value of css_alloc
From
Date

> On 22 Jan 2018, at 11:55 PM, Tejun Heo <tj@kernel.org> wrote:
>
> Hello,
>
> On Mon, Jan 22, 2018 at 09:38:51PM +0800, Xiongwei Song wrote:
>> The function css_alloc never return NULL, it may return normal pointer or
>
> It's a calling a controller implemented method. I'd much rather keep
> the extra protection.
>
>> error codes that made by ERR_PTR, so !css is always false, we need use
>> IS_ERR to check it, and if this is true, we should use ERR_CAST handle it.
>
> It's of the same type. Why would it need casting?

Okay, Thanks for your comment.

Apologies for the noise.

Thanks
Xiongwei
>
> Thanks.
>
> --
> tejun

\
 
 \ /
  Last update: 2018-01-23 00:22    [W:0.025 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site