Linux cryptographic layer development
 help / color / mirror / Atom feed
* [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init()
@ 2024-09-03 14:42 Li Zetao
  2024-09-13 10:19 ` Herbert Xu
  0 siblings, 1 reply; 9+ messages in thread
From: Li Zetao @ 2024-09-03 14:42 UTC (permalink / raw)
  To: giovanni.cabiddu, herbert, davem, lucas.segarra.fernandez,
	damian.muszynski
  Cc: lizetao1, qat-linux, linux-crypto

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@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-10-05  5:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-03 14:42 [PATCH -next] crypto: qat - remove redundant null pointer checks in adf_dbgfs_init() Li Zetao
2024-09-13 10:19 ` Herbert Xu
2024-09-13 14:52   ` Cabiddu, Giovanni
2024-09-14  8:40     ` Herbert Xu
2024-09-14  8:50       ` Greg Kroah-Hartman
2024-09-14 11:40         ` Herbert Xu
2024-09-14 13:58           ` Greg Kroah-Hartman
2024-09-16  9:42             ` [PATCH] crypto: qat - remove check after debugfs_create_dir() Cabiddu, Giovanni
2024-10-05  5:32               ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox