]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Tue, 24 Apr 2012 15:56:29 +0000 (17:56 +0200)
committerChris Ball <cjb@laptop.org>
Tue, 24 Apr 2012 16:21:22 +0000 (12:21 -0400)
commit62b31e4304151635e5595bd5a1d0bbd06fba3d87
treeb6de3a76c45c5fdfc9a6d1229c77906d067b853a
parent38351e5a8f05a3b9bbe259c2365be876a605a54f
mmc: cd-gpio: protect against NULL context in mmc_cd_gpio_free()

Do not oops, even if mmc_cd_gpio_free() is mistakenly called on a driver
cleanup path, even though a previous call to mmc_cd_gpio_request() failed.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
[stable@: please apply to 3.3-stable]
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/core/cd-gpio.c