From 27daabd9b6a157c34a6e7a7f509fa26866e6420f Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Mon, 8 Jul 2013 16:01:58 -0700 Subject: [PATCH] lib/scatterlist: error handling in __sg_alloc_table() I was reviewing code which I suspected might allocate a zero size SG table. That will cause memory corruption. Also we can't return before doing the memset or we could end up using uninitialized memory in the cleanup path. Signed-off-by: Dan Carpenter Cc: Akinobu Mita Cc: Imre Deak Cc: Tejun Heo Cc: Daniel Vetter Cc: Maxim Levitsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-format-patch failed