Re: [PATCH] staging: greybus: fix coccinelle false positive on potential NULL dereference

From: Greg KH

Date: Fri Jul 31 2026 - 07:21:39 EST


On Tue, Jul 28, 2026 at 04:44:52PM +0800, Pei Xiao wrote:
> In gb_bootrom_get_firmware(), when fw is NULL, ret is already set to
> ERRNO before jumping to the queue_work label, so !ret is always
> false and fw->size is never dereferenced. Add an explicit NULL check
> to silence a coccinelle false positive warning.

Why not fix the coccinelle tool/script instead?

thanks,

greg k-h