mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 08:45:26 -05:00
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>
This commit is contained in:
committed by
Juergen Gross
parent
6a23ae0a96
commit
6fec913ff1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user