Re: [PATCH] usb: musb: debugfs: fix error check

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

 



On Tue, Jan 31, 2012 at 02:23:37PM +0200, Felipe Balbi wrote:
> debugfs will return NULL on failure if
> debugfs is enabled or -ENODEV if debugfs
> isn't enabled.
> 
> Need to handle both cases.

No you should not.  Just don't check for NULL, and continue on, that is
why the debugfs api was created the way it is.  You don't want to error
out of your code if debugfs isn't enabled, just ignore it.

So the code, as-is, is just fine, please don't apply this.

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux