Skip to contentSkip to conversation

USB: mon: no need to check return value of debugfs_create functions

PATCH New Greg Kroah-Hartman 1 participant 1 message May 29, 2018 USB

lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 5/22 USB: mon: no need to check return value of debugfs_create functions

Quoted 11 lines · Pete Zaitcev
Quoted 3 lines · On Tue, 29 May 2018 17:30:50 +0200 Greg Kroah-Hartman…

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.

Okay, fair enough. And the code works, surprisingly, even when the debugfs is disabled (well, according to my review). I just have one question - wouldn't it be cleaner to deprecate and remove the text API altogether?

If you think we can do that, sure! But what's the odds that someone still uses it? This patch doesn't change any real functionality.

thanks,

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