Re: [PATCH] seq_file: fix condition while loop

From: Al Viro
Date: Thu Oct 31 2019 - 10:06:06 EST


On Thu, Oct 31, 2019 at 07:38:21PM +0800, Yi Li wrote:
> From: Yi Li <yilikernel@xxxxxxxxx>
>
> Use the break condition of loop body.
> PTR_ERR has some meanings when p is illegal,and return 0 when p is null.
> set the err = 0 on the next iteration if err > 0.

IDGI. PTR_ERR() is not going to cause any kind of undefined behaviour for
any valid pointer and it's trivial to evaluate. What's the point?