Re: [PATCH] crypto: qat - remove check after debugfs_create_dir()

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

 



On Mon, Sep 16, 2024 at 10:42:51AM +0100, Cabiddu, Giovanni wrote:
> The debugfs functions are guaranteed to return a valid error code
> instead of NULL upon failure. Consequently, the driver can directly
> propagate any error returned without additional checks.
> 
> Remove the unnecessary `if` statement after debugfs_create_dir(). If
> this function fails, the error code is stored in accel_dev->debugfs_dir
> and utilized in subsequent debugfs calls.
> 
> Additionally, since accel_dev->debugfs_dir is assured to be non-NULL,
> remove the superfluous NULL pointer checks within the adf_dbgfs_add()
> and adf_dbgfs_rm().
> 
> Fixes: 9260db6640a6 ("crypto: qat - move dbgfs init to separate file")
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> ---
>  drivers/crypto/intel/qat/qat_common/adf_dbgfs.c | 13 +------------
>  1 file changed, 1 insertion(+), 12 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




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