Re: [PATCH] staging: media: av7110: fix error code in frontend_init()
From: Dan Carpenter
Date: Mon Mar 16 2026 - 04:33:17 EST
On Fri, Mar 13, 2026 at 06:36:52PM +0100, Tomasz Unger wrote:
> Return -ENODEV instead of -ENOMEM when no frontend driver is found
> for the device. -ENODEV is semantically correct here as the failure
> is due to no matching frontend driver being found, not a memory
> allocation failure.
>
> Signed-off-by: Tomasz Unger <tomasz.unger@xxxxxxxx>
> ---
Returning -ENOMEM is just as reasonable as -ENODEV. We're looking at
if ves1820_attach(), ves1x93_attach() or stv0299_attach() etc fail.
Memory allocation failures seem like the most common cause to me.
The FIXME also seems reasonable... Just leave it as-is until someone
can address it properly.
regards,
dan carpenter