Since the debugfs_create_dir() never returns a null pointer, checking the return value for a null pointer is redundant, and using IS_ERR is safe enough. Signed-off-by: Li Zetao <lizetao1@xxxxxxxxxx> --- drivers/crypto/intel/qat/qat_common/adf_dbgfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/intel/qat/qat_common/adf_dbgfs.c b/drivers/crypto/intel/qat/qat_common/adf_dbgfs.c index c42f5c25aabd..ec2c712b9006 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_dbgfs.c +++ b/drivers/crypto/intel/qat/qat_common/adf_dbgfs.c @@ -30,7 +30,7 @@ void adf_dbgfs_init(struct adf_accel_dev *accel_dev) pci_name(accel_dev->accel_pci_dev.pci_dev)); ret = debugfs_create_dir(name, NULL); - if (IS_ERR_OR_NULL(ret)) + if (IS_ERR(ret)) return; accel_dev->debugfs_dir = ret; -- 2.34.1