]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
sdio: fix reference counting in sdio_remove_func()
authorDaniel Drake <dsd@laptop.org>
Thu, 17 Dec 2009 23:27:17 +0000 (15:27 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Dec 2009 23:45:31 +0000 (15:45 -0800)
commit3d10a1ba0d37c8f5fd5afcdda00613fbb8a90bf5
tree2ece821a975a989e3932a9a71ed4353b1edb32f7
parentf6151dfea21496d43dbaba32cfcd9c9f404769bc
sdio: fix reference counting in sdio_remove_func()

sdio_remove_func() needs to be more careful about reference counting.  It
can be called in error paths where sdio_add_func() has never been called
e.g.  mmc_attach_sdio error path --> mmc_sdio_remove --> sdio_remove_func

Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Matt Fleming <matt@console-pimps.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/core/sdio_bus.c