From: Nicolas Ferre Date: Tue, 11 May 2010 21:06:49 +0000 (-0700) Subject: mmc: atmel-mci: prevent kernel oops while removing card X-Git-Tag: v2.6.34~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=009a891b22395fc86e5f34057d79fffee4509ab5;p=pandora-kernel.git mmc: atmel-mci: prevent kernel oops while removing card The removing of an SD card in certain circumstances can lead to a kernel oops if we do not make sure that the "data" field of the host structure is valid. This patch adds a test in atmci_dma_cleanup() function and also calls atmci_stop_dma() before throwing away the reference to data. Signed-off-by: Nicolas Ferre Cc: Haavard Skinnemoen Cc: Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed