diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2014-01-21 09:52:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-13 13:55:46 -0800 |
commit | c28a553bd62e80b4ef51592e2b787ceb71754fec (patch) | |
tree | 9da4ad940a69eb653cb07c14e2cb646b1f80250a /drivers/mmc | |
parent | 0a3ce0fcb82f60a7682c2130dc9f15fb25f2d306 (diff) |
mmc: sdhci-pci: Fix possibility of chip->fixes being null
commit 945be38caa287b177b8c17ffaae7754cab6a658f upstream.
It is possible for chip->fixes to be null. Check before dereferencing it.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <chris@printf.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-pci.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index b7d1792d33d3..cc05051fac99 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -1466,7 +1466,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; |