Re: [PATCH] ubifs: no need to check return value of debugfs_create functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 12, 2019 at 08:53:57PM +0200, Richard Weinberger wrote:
> Greg,
> 
> ----- Ursprüngliche Mail -----
> > Von: "Greg Kroah-Hartman" <gregkh@xxxxxxxxxxxxxxxxxxx>
> > An: "richard" <richard@xxxxxx>, "Artem Bityutskiy" <dedekind1@xxxxxxxxx>, "Adrian Hunter" <adrian.hunter@xxxxxxxxx>
> > CC: "linux-mtd" <linux-mtd@xxxxxxxxxxxxxxxxxxx>
> > Gesendet: Mittwoch, 12. Juni 2019 17:21:20
> > Betreff: [PATCH] ubifs: no need to check return value of debugfs_create functions
> 
> > When calling debugfs functions, there is no need to ever check the
> > return value.  The function can work or not, but the code logic should
> > never do something different based on this.
> 
> why is it bad if we handle errors from debugfs?

Because there is no need to?  If debugfs fails, there is nothing that a
user can do about it :)

> At least a nice log message a la "sorry, no ubifs debuging for you"
> would be nice to have.

I think the lack of a debugfs file is kind of obvious :)

Anyway, the point is that there is no need to check for return values
from debugfs, and the logic of the non-debugfs code should not do
anything different if debugfs is acting up or not.

thanks,

greg k-h

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux