From: Florian Fainelli Date: Fri, 31 Oct 2014 22:51:35 +0000 (-0700) Subject: net: systemport: do not crash freeing an unitialized TX ring X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~119^2~50^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=914adb55afbc7e449512f609de19e548d1054480;p=pandora-kernel.git net: systemport: do not crash freeing an unitialized TX ring Callers of bcm_sysport_init_tx_ring() can currently fail, and will always call bcm_sysport_fini_tx_ring() in a loop ending at the number of TX queues (32) without checking if the TX ring was successfully initialized or not. Update bcm_sysport_fini_tx_ring() to return early and avoid a crash de-referencing ring->cbs if the TX ring was not initialized, since ring->cbs is the last part of the initialization done by bcm_sysport_init_tx_ring() that could fail. Fixes: 80105befdb4b ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver") Reported-by: Maxime Bizon Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- Reading git-diff-tree failed