[PATCH 1/1] ubifs: debugfs operations may return both ERRs and NULLs

Artem Bityutskiy dedekind1 at gmail.com
Mon Mar 28 02:51:27 EDT 2011


On Wed, 2011-03-23 at 15:35 +0200, Phil Carmody wrote:
> I knew I invented IS_ERR_OR_NULL for something, and this was probably
> it. NULL has lost all information about what the error was, and the most
> appropriate error code is ENODEV. However, that's the only error code
> that the debugfs functions can return. So basically, any error = ENODEV.

This is not true that any error is -ENODEV. There are many other errors
possible, e.g., due to an invocation of simple_pin_fs().

I think the right fix would be to fix debugfs and return an error code
in any case.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)




More information about the linux-mtd mailing list