USB: typec: tcpm: no need to check return value of debugfs_create_dir()
Greg Kroah-Hartman
maintainerPATCH 1/22 USB: typec: tcpm: no need to check return value of debugfs_create_dir()
Quoted 13 lines · Heikki Krogerus
+Guenter
Quoted 10 lines · 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.
Clean up the
tcpm.ccode to not care about this, turns out no one was even checking the return value of this function, so it didn't matter.Note, I do not think this code can be removed in a running system, as the debugfs root directory will stick around, that should be fixed someday...
As Guenter pointed out to a different patch in this series, the code is correct as-is, I read it wrong. I'll delete this sentance from the changelog when I apply it.
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