Re:[PATCH] drm: mali-dp: check the return value of kzalloc()

2022-03-24 Thread Xiaoke Wang
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

Re: [Intel-gfx] [PATCH] drm/i915/selftests: check the return value of kstrdup()

2022-03-03 Thread Xiaoke Wang
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