Thu, 24 Mar 2022 14:43:17 +0800, xkernel.w...@foxmail.com wrote:
> kzalloc() is a memory allocation function which can return NULL when
> some internal memory errors happen. So it is better to check it to
> prevent potential wrong memory access.
Withdraw this. The original code is also fine since
Matthew Auld wrote:
> Scratch that. it looks like the for() already accounts for this, as
> pointed out by Chris.
Yes, you are right.
I rechecked and found this one is indeed an ordinary code smell.
Thank you for taking the time.
Xiaoke Wang