drivers: mmc: fix issue raised by source code analyzer tool
Fix the below reported issues by source code analyzer.
1) Pointer 'ext_csd' returned from call to function 'mmc_get_ext_csd'
may be NULL and will be dereferenced at ext_csd[EXT_CSD_CMDQ] in
mmc_test_awake_ext_csd(), causing NUll pointer derefernce.
2) Array 'sdhci_slot' of size 2 may use index value(s) -1 as below,
when ret = 0.
sdhci_slot[ret-1] = msm_host;
3) Variable 'host->lock' locked ,And was not unlocked when below
condition occurs in sdhci_irq().
if (!mmc_card_and_host_support_async_int(host->mmc))
return IRQ_NONE;
CRs-Fixed: 1000387
Change-Id: Iec6ecef1bf940e720c871be58b265394904f0cf1
Signed-off-by:
Pavan Anamula <pavana@codeaurora.org>
Loading
Please register or sign in to comment