On Sat, Sep 14, 2024 at 10:50:33AM +0200, Greg Kroah-Hartman wrote: > > > 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. > > debugfs, if something goes wrong, will return a real error, never NULL, > so any return value from a call can be passed back in. Right, that's why we should remove the if statement so that the error is saved and can then be passed back into the next debugfs call. With the error-checking if statement there, the error is discarded and the next debugfs call from this driver will simply get a NULL parent dentry. Cheers, -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt