From: Claudiu Manoil Date: Thu, 8 Nov 2012 22:11:41 +0000 (+0000) Subject: gianfar: Fix alloc_skb_resources on -ENOMEM cleanup path X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~45^2~386 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1eb8f7a7da6d3b36fcc339d7bbddbf8315a5c1dd;p=pandora-kernel.git gianfar: Fix alloc_skb_resources on -ENOMEM cleanup path Should gfar_init_bds() return with -ENOMEM inside gfar_alloc_skb_resources(), free_skb_resources() will be called twice in a row on the "cleanup" path, leading to duplicate kfree() calls for rx_|tx_queue->rx_|tx_skbuff resulting in segmentation fault. This patch prevents the segmentation fault to happen in the future (rx_|tx_sbkbuff set to NULL), and corrects the error path handling for gfar_init_bds(). Cc: Paul Gortmaker Signed-off-by: Claudiu Manoil Acked-by: Paul Gortmaker Signed-off-by: David S. Miller --- Reading git-diff-tree failed