Re: [PATCH] security/apparmor/domain: use PTR_ERR_OR_ZERO

2019-01-16 Thread John Johansen
On 1/4/19 1:17 AM, Peng Hao wrote: > The variable 'new' may be NULL, so use PTR_ERR_OR_ZERO instead > of PTR_ERR. > > Signed-off-by: Peng Hao yep that is a problem unfortunately the fix isn't quite right we don't want to return 0 for an error here. Instead we can do diff --git

[PATCH] security/apparmor/domain: use PTR_ERR_OR_ZERO

2019-01-03 Thread Peng Hao
The variable 'new' may be NULL, so use PTR_ERR_OR_ZERO instead of PTR_ERR. Signed-off-by: Peng Hao --- security/apparmor/domain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/apparmor/domain.c b/security/apparmor/domain.c index 08c88de..7663589 100644 ---