Re: [PATCH] staging: vme_user: reorder NULL check after kzalloc in fake_crcsr_init

From: Ethan Tidmore

Date: Sat Feb 07 2026 - 21:33:54 EST


On Sat Feb 7, 2026 at 3:55 PM CST, Artem Lytkin wrote:
> Move the NULL check for bridge->crcsr_kernel before its use in
> fake_ptr_to_pci(). While fake_ptr_to_pci() is a simple cast that
> handles NULL safely, using a value before validating it is a bad
> pattern that static analyzers flag and could become a real issue
> if fake_ptr_to_pci() changes in the future.
>
> Signed-off-by: Artem Lytkin <iprintercanon@xxxxxxxxx>

LGTM.

Next time, in your subject line, it's standard practice to end function
names with () to make it clear you're talking about a function.

Reviewed-by: Ethan Tidmore <ethantidmore06@xxxxxxxxx>

Thanks,

ET