Re: [PATCH] staging: gpib: ines: Check the return value of ioremap()
From: Greg KH
Date: Wed Nov 26 2025 - 08:26:49 EST
On Wed, Nov 26, 2025 at 09:36:18AM +0800, Haotian Zhang wrote:
> The function ioremap() in ines_gpib_config() can fail and return NULL,
> which is dereferenced without checking, leading to a NULL pointer
> dereference.
>
> Add a check for the return value of ioremap() and return -ENOMEM on
> failure.
>
> Fixes: bb1bd92fa0f2 ("staging: gpib: Add ines GPIB driver")
> Signed-off-by: Haotian Zhang <vulab@xxxxxxxxxxx>
> ---
> drivers/staging/gpib/ines/ines_gpib.c | 5 +++++
This file has now moved :(
And do you have this hardware to test this with? If so, a lot more
cleanup can be done in this function.
thanks,
greg k-h