Skip to content

Commit 6fec913

Browse files
tobluxjgross1
authored andcommitted
drivers/xen/xenbus: Simplify return statement in join()
Don't unnecessarily negate 'buffer' and simplify the return statement. Reviewed-by: Jason Andryuk <jason.andryuk@amd.com> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <20251112171410.3140-2-thorsten.blum@linux.dev>
1 parent 6a23ae0 commit 6fec913

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/xen/xenbus/xenbus_xs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ static char *join(const char *dir, const char *name)
407407
buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s", dir);
408408
else
409409
buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s/%s", dir, name);
410-
return (!buffer) ? ERR_PTR(-ENOMEM) : buffer;
410+
return buffer ?: ERR_PTR(-ENOMEM);
411411
}
412412

413413
static char **split(char *strings, unsigned int len, unsigned int *num)

0 commit comments

Comments
 (0)