Skip to content

Commit 035a695

Browse files
Li Zetaojgross1
authored andcommitted
xen: xenbus: Use helper function IS_ERR_OR_NULL()
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>
1 parent 71281ec commit 035a695

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/xen/xenbus/xenbus_probe_frontend.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ static void xenbus_check_frontend(char *class, char *dev)
429429
printk(KERN_DEBUG "XENBUS: frontend %s %s\n",
430430
frontend, xenbus_strstate(fe_state));
431431
backend = xenbus_read(XBT_NIL, frontend, "backend", NULL);
432-
if (!backend || IS_ERR(backend))
432+
if (IS_ERR_OR_NULL(backend))
433433
goto out;
434434
err = xenbus_scanf(XBT_NIL, backend, "state", "%i", &be_state);
435435
if (err == 1)

0 commit comments

Comments
 (0)