On 12 September 2013 13:41, Sachin Kamat <sachin.kamat@xxxxxxxxxx> wrote: > Yes. That was my second option. If we do that we would get something as below: > > 84 /* If pdata is required */ > 85 if (cd_gpio != -1) { > 86 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); > 87 if (!pdata) { > 88 dev_err(&pdev->dev, "DT: kzalloc failed\n"); > 89 goto out; > 90 } > 91 pdata->card_int_gpio = cd_gpio; > 92 return pdata; > 93 } > 94 > 95 out: > 96 return ERR_PTR(-ENODATA); > > Does this look OK? Or this: > 85 if (cd_gpio != -1) { > 86 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); > 87 if (!pdata) > 88 dev_err(&pdev->dev, "DT: kzalloc failed\n"); else > 91 pdata->card_int_gpio = cd_gpio; > 93 } > 94 > 96 return ERR_PTR(-ENODATA); -- 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