]> git.baikalelectronics.ru Git - 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)
commita278d4711c0d47bee8c455f481e35a5f62703119
treec818af028139077880e8f09d7164bcc8774c7e0c
parent8916f74b5775c2fcd51570742f02565c7b0419a6
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