[PATCH -next] greybus: Remove redundant null pointer checks in gb_svc_pwrmon_debugfs_init()

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

 



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/greybus/svc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
index 4256467fcd35..906ea61cba30 100644
--- a/drivers/greybus/svc.c
+++ b/drivers/greybus/svc.c
@@ -765,7 +765,7 @@ static void gb_svc_pwrmon_debugfs_init(struct gb_svc *svc)
 	u8 rail_count;
 
 	dent = debugfs_create_dir("pwrmon", svc->debugfs_dentry);
-	if (IS_ERR_OR_NULL(dent))
+	if (IS_ERR(dent))
 		return;
 
 	if (gb_svc_pwrmon_rail_count_get(svc, &rail_count))
-- 
2.34.1

_______________________________________________
greybus-dev mailing list -- greybus-dev@xxxxxxxxxxxxxxxx
To unsubscribe send an email to greybus-dev-leave@xxxxxxxxxxxxxxxx



[Index of Archives]     [Asterisk App Development]     [PJ SIP]     [Gnu Gatekeeper]     [IETF Sipping]     [Info Cyrus]     [ALSA User]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite News]     [Deep Creek Hot Springs]     [Yosemite Campsites]     [ISDN Cause Codes]     [Asterisk Books]

  Powered by Linux