[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20251021135002.1228-2-thorsten.blum@linux.dev>
Date: Tue, 21 Oct 2025 15:49:58 +0200
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Juergen Gross <jgross@...e.com>,
Stefano Stabellini <sstabellini@...nel.org>,
Oleksandr Tyshchenko <oleksandr_tyshchenko@...m.com>,
Jason Andryuk <jason.andryuk@....com>,
"Dr. David Alan Gilbert" <linux@...blig.org>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>,
xen-devel@...ts.xenproject.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] drivers/xen/xenbus: Simplify return statement in join()
Don't unnecessarily negate 'buffer' and simplify the return statement.
Signed-off-by: Thorsten Blum <thorsten.blum@...ux.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
Powered by blists - more mailing lists