summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2014-01-21 07:52:39 (GMT)
committerChris Ball <chris@printf.net>2014-01-23 15:52:53 (GMT)
commit945be38caa287b177b8c17ffaae7754cab6a658f (patch)
treeace5ef83fd0d430df3a47a47dfe81036b26750bf /drivers/mmc
parent77a0122e0838663795651aa0beb2325156f98c09 (diff)
downloadlinux-945be38caa287b177b8c17ffaae7754cab6a658f.tar.xz
mmc: sdhci-pci: Fix possibility of chip->fixes being null
It is possible for chip->fixes to be null. Check before dereferencing it. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Cc: stable <stable@vger.kernel.org> # 3.11+ Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci-pci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c
index 92e6e81..0955777 100644
--- a/drivers/mmc/host/sdhci-pci.c
+++ b/drivers/mmc/host/sdhci-pci.c
@@ -1378,7 +1378,8 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(
* from runtime suspend. If it is not there, don't allow runtime PM.
* Note sdhci_pci_add_own_cd() sets slot->cd_gpio to -EINVAL on failure.
*/
- if (chip->fixes->own_cd_for_runtime_pm && !gpio_is_valid(slot->cd_gpio))
+ if (chip->fixes && chip->fixes->own_cd_for_runtime_pm &&
+ !gpio_is_valid(slot->cd_gpio))
chip->allow_runtime_pm = false;
return slot;