Re: [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init()

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

 



On Sat, Sep 14, 2024 at 07:40:31PM +0800, Herbert Xu wrote:
> 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.

Sorry, but yes, we are in agreement here, sorry, been reviewing a lot of
these "clean up" fixes that were wrong and got them confused.

thanks,

greg k-h




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux