On 12 September 2013 13:51, Sachin Kamat <sachin.kamat@xxxxxxxxxx> wrote: > 'of_id' is dereferenced before NULL pointer check. Move it to > after the check. > > Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx> > --- > Compile tested. > --- > drivers/mmc/host/wmt-sdmmc.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c > index 34231d5..3523a72 100644 > --- a/drivers/mmc/host/wmt-sdmmc.c > +++ b/drivers/mmc/host/wmt-sdmmc.c > @@ -771,7 +771,7 @@ static int wmt_mci_probe(struct platform_device *pdev) > struct device_node *np = pdev->dev.of_node; > const struct of_device_id *of_id = > of_match_device(wmt_mci_dt_ids, &pdev->dev); > - const struct wmt_mci_caps *wmt_caps = of_id->data; > + const struct wmt_mci_caps *wmt_caps; > int ret; > int regular_irq, dma_irq; > > @@ -780,6 +780,8 @@ static int wmt_mci_probe(struct platform_device *pdev) > return -EFAULT; > } > > + wmt_caps = of_id->data; > + > if (!np) { > dev_err(&pdev->dev, "Missing SDMMC description in devicetree\n"); > return -EFAULT; > -- > 1.7.9.5 > Gentle ping... -- With warm regards, Sachin -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html