mmc/card/queue.c: change action when the condition of if is true
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · On Thursday 25 October 2012 06:29 PM, [email protected] wrote:
From: Jing Wang <[email protected]>
Some description of the actual effect of the change here would be nice. For example, "Trim the error handling path in mmc_alloc_sg". But what's the point of this patch anyway ? There are 2 "return" statements instead of one.
Quoted 29 lines
Signed-off-by Jing Wang <[email protected]>--- drivers/mmc/card/queue.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)drivers/mmc/card/queue.c +5
-4@@ -118,13 +118,14 @@ static struct scatterlist *mmc_alloc_sg(int sg_len, int *err)struct scatterlist *sg; sg =kmalloc (sizeof (struct scatterlist )*sg_len,GFP_KERNEL ); -if (!sg) +if (!sg) { *err = -ENOMEM ; -else { - *err =0 ; -sg_init_table (sg, sg_len); +return sg; } + *err =0 ; +sg_init_table (sg, sg_len); +return sg; }