Re: [PATCH] Input: fm801-gp - Fix an error handling path

From: Dmitry Torokhov
Date: Tue Dec 20 2022 - 13:59:30 EST


Hi Christophe,

On Mon, Dec 19, 2022 at 10:36:47PM +0100, Christophe JAILLET wrote:
> This looks odd to call release_resource() for something allocated with
> request_region().
> Use release_region() instead.

I do not see why it is weird. request_region() gives you an instance of
"resource" structure which can later be freed. If we indeed want to use
release_region() (and hardcode the length in both places) then we should
also remove gp->res_port member. But I really do not find anything wrong
nor do I want to touch these old drivers...

Thanks.

--
Dmitry