On Fri, Sep 13, 2024 at 03:52:52PM +0100, Cabiddu, Giovanni wrote: > > As I understand it, there is no need to check the return value of > debugfs_create_*() functions. See f0fcf9ade46a ("crypto: qat - no need to check > return value of debugfs_create functions"), where all checks after the > debugfs_create_*() were removed. Right. > In this particular case, the check is present only to avoid attempting to > create attributes if the directory is missing, since we know such an > attempt will fail. I think this is still buggy. That if statement should be removed as otherwise subsequent calls to debugfs_create_file will provide a NULL parent dentry instead of an error parent dentry. This causes debugfs to do things differently. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt