From a004e1ee493f4cbb3a1e517534fb700b1081d3e5 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 29 Nov 2012 14:19:22 +1100 Subject: [PATCH] scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error-fix s/E2BIG/EINVAL/ Cc: Nick Bowler Cc: Maxim Levitsky Cc: Tejun Heo Cc: Jens Axboe Signed-off-by: Andrew Morton --- lib/scatterlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/scatterlist.c b/lib/scatterlist.c index 11ecaf000696..7874b01e816e 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -249,7 +249,7 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents, #ifndef ARCH_HAS_SG_CHAIN if (WARN_ON_ONCE(nents > max_ents)) - return -E2BIG; + return -EINVAL; #endif memset(table, 0, sizeof(*table)); -- 2.39.5