]> git.karo-electronics.de Git - karo-tx-linux.git/commit
scatterlist: don't BUG when we can trivially return a proper error.
authorNick Bowler <nbowler@elliptictech.com>
Thu, 29 Nov 2012 03:19:22 +0000 (14:19 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:59 +0000 (16:23 +1100)
commit408c43713170c1fd2664385cc2e586dcb05dddbb
tree45dba5b47556c5b3bce86a28796699df09763788
parent7a551e9de839ad66917af31c8a7ef004d5782828
scatterlist: don't BUG when we can trivially return a proper error.

There is absolutely no reason to crash the kernel when we have a perfectly
good return value already available to use for conveying failure status.

Let's return an error code instead of crashing the kernel: that sounds
like a much better plan.

Signed-off-by: Nick Bowler <nbowler@elliptictech.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/scatterlist.c