On 11 April 2013 08:43, Seungwon Jeon <tgih.jun@xxxxxxxxxxx> wrote: > On Wednesday, April 10, 2013, Doug Anderson wrote: >> Thomas, >> >> On Wed, Apr 10, 2013 at 6:56 AM, Doug Anderson <dianders@xxxxxxxxxxxx> wrote: >> > On Wed, Apr 10, 2013 at 5:48 AM, Thomas Abraham >> > <thomas.abraham@xxxxxxxxxx> wrote: >> >> The call to regulator_enable() is prior to the call to mmc_add_host(). >> >> Hence, call to mmc_fre_host is not required in this case. So the above >> >> change should be right. >> > >> > Are you sure that mmc_free_host() is the opposite of mmc_add_host() >> > and not mmc_alloc_host()? >> > >> > I'll double-check myself in a few hours when I'm in front of a computer. >> >> OK, I double checked and I'm still convinced that the free is needed >> because we've already called mmc_alloc_host(). Current code always >> makes sure to free when it returns an error and that seems right to >> me. > mmc_alloc_host corresponds to mmc_free_host. And mmc_add_host matches > with mmc_remove_host. Let's focus on mmc_alloc_host. > mmc_alloc_host is called prior to regulator_enable. > So, if regulator_enable is failed, call of mmc_free_host makes sense. > Hi Doug, Seungwon, Ok, I got it wrong again. Thanks for letting me know. I will fix this and send the v5 of this patch. Thanks, Thomas. > Thanks, > Seungwon Jeon >> >> -Doug >> -- >> 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 > -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html