blob: 218876b45b0d8ffe39dd5fa408da5107cdbb42bb [file] [log] [blame]
From 8885c483ff89dc4de3421211ff6b49e8bde323ab Mon Sep 17 00:00:00 2001
From: Nathan Chancellor <>
Date: Thu, 30 Jan 2020 22:16:37 -0800
Subject: [PATCH] lib/scatterlist.c: adjust indentation in __sg_alloc_table
commit 4e456fee215677584cafa7f67298a76917e89c64 upstream.
Clang warns:
../lib/scatterlist.c:314:5: warning: misleading indentation; statement
is not part of the previous 'if' [-Wmisleading-indentation]
return -ENOMEM;
../lib/scatterlist.c:311:4: note: previous statement is here
if (prv)
1 warning generated.
This warning occurs because there is a space before the tab on this
line. Remove it so that the indentation is consistent with the Linux
kernel coding style and clang no longer warns.
Fixes: edce6820a9fd ("scatterlist: prevent invalid free when alloc fails")
Signed-off-by: Nathan Chancellor <>
Signed-off-by: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
Signed-off-by: Paul Gortmaker <>
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index eacb82468437..a79ef84f0fd6 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -303,7 +303,7 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents,
if (prv)
table->nents = ++table->orig_nents;
- return -ENOMEM;
+ return -ENOMEM;
sg_init_table(sg, alloc_size);