msm: mmc: Check card structure for NULL pointer
Check card structure for NULL pointer before dereferencing it to check for asynchronous interrupt support. Change-Id: Ie433d076c4624616a0fceb02b7d9754116669da4 Signed-off-by: Amandeep Singh <amansing@codeaurora.org>
This commit is contained in:
parent
ffc3c271c9
commit
8ed99bcd17
1 changed files with 2 additions and 2 deletions
|
@ -735,8 +735,8 @@ static inline int mmc_boot_partition_access(struct mmc_host *host)
|
|||
|
||||
static inline bool mmc_card_and_host_support_async_int(struct mmc_host *host)
|
||||
{
|
||||
return ((host->caps2 & MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE) &&
|
||||
(host->card->cccr.async_intr_sup));
|
||||
return (host->card && (host->caps2 & MMC_CAP2_ASYNC_SDIO_IRQ_4BIT_MODE)
|
||||
&& (host->card->cccr.async_intr_sup));
|
||||
}
|
||||
|
||||
static inline int mmc_host_uhs(struct mmc_host *host)
|
||||
|
|
Loading…
Add table
Reference in a new issue