* [PATCH] drivers/xen/xenbus: Simplify return statement in join()
@ 2025-10-21 13:49 Thorsten Blum
2025-10-24 20:52 ` Jason Andryuk
0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2025-10-21 13:49 UTC (permalink / raw)
To: Juergen Gross, Stefano Stabellini, Oleksandr Tyshchenko,
Jason Andryuk, Dr. David Alan Gilbert
Cc: Thorsten Blum, xen-devel, linux-kernel
Don't unnecessarily negate 'buffer' and simplify the return statement.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
drivers/xen/xenbus/xenbus_xs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c
index 528682bf0c7f..7c6c12925326 100644
--- a/drivers/xen/xenbus/xenbus_xs.c
+++ b/drivers/xen/xenbus/xenbus_xs.c
@@ -407,7 +407,7 @@ static char *join(const char *dir, const char *name)
buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s", dir);
else
buffer = kasprintf(GFP_NOIO | __GFP_HIGH, "%s/%s", dir, name);
- return (!buffer) ? ERR_PTR(-ENOMEM) : buffer;
+ return buffer ?: ERR_PTR(-ENOMEM);
}
static char **split(char *strings, unsigned int len, unsigned int *num)
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-24 20:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-21 13:49 [PATCH] drivers/xen/xenbus: Simplify return statement in join() Thorsten Blum
2025-10-24 20:52 ` Jason Andryuk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).