]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed
authorWei WANG <wei_wang@realsil.com.cn>
Sun, 27 Jan 2013 00:55:16 +0000 (01:55 +0100)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 27 Jan 2013 01:18:07 +0000 (02:18 +0100)
commit2d1484f5990c094e2c706672a8d286576dd096b4
treec818af028139077880e8f09d7164bcc8774c7e0c
parentff0decd49343c7c5bd0dbeadace344d69b9f205f
mfd: rtsx: Fix oops when rtsx_pci_sdmmc is not probed

If rtsx_pci_sdmmc is not probed, function pointer pcr->slots[].card_event
will point to NULL, and thus rtsx_pci_card_detect will reference a NULL
pointer.
Check card_event pointer before referencing it can avoid kernel panic.

Signed-off-by: Wei WANG <wei_wang@realsil.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/rtsx_pcr.c