projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71281ec
)
xen: xenbus: Use helper function IS_ERR_OR_NULL()
author
Li Zetao
<lizetao1@huawei.com>
Thu, 17 Aug 2023 01:47:36 +0000
(09:47 +0800)
committer
Juergen Gross
<jgross@suse.com>
Mon, 21 Aug 2023 07:55:11 +0000
(09:55 +0200)
Use IS_ERR_OR_NULL() to detect an error pointer or a null pointer
open-coding to simplify the code.
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link:
https://lore.kernel.org/r/20230817014736.3094289-1-lizetao1@huawei.com
Signed-off-by: Juergen Gross <jgross@suse.com>
drivers/xen/xenbus/xenbus_probe_frontend.c
patch
|
blob
|
history
diff --git
a/drivers/xen/xenbus/xenbus_probe_frontend.c
b/drivers/xen/xenbus/xenbus_probe_frontend.c
index 3f3836cb72799bc1d6b63f586246deda11e6030d..fcb335bb7b1878c690532d5e854f7703bd6af25b 100644
(file)
--- a/
drivers/xen/xenbus/xenbus_probe_frontend.c
+++ b/
drivers/xen/xenbus/xenbus_probe_frontend.c
@@
-429,7
+429,7
@@
static void xenbus_check_frontend(char *class, char *dev)
printk(KERN_DEBUG "XENBUS: frontend %s %s\n",
frontend, xenbus_strstate(fe_state));
backend = xenbus_read(XBT_NIL, frontend, "backend", NULL);
- if (
!backend || IS_ERR
(backend))
+ if (
IS_ERR_OR_NULL
(backend))
goto out;
err = xenbus_scanf(XBT_NIL, backend, "state", "%i", &be_state);
if (err == 1)