<div dir="ltr"><div class="gmail_extra">HI Ido,<br></div><div class="gmail_extra"> I see. But this is system init call order error, something driver interface have called before module driver init have ready, if this situation is exsist, we can' t release the bank pointer if only some lock have register failed, for example, omap_hwspinlock <br>
"reg_fail:<br> pm_runtime_disable(&pdev->dev);<br> kfree(bank);<br>"<br><br></div><div class="gmail_extra">So, because this is not problem.<br><br><br></div><div class="gmail_extra">Yes, this test function is good patch, i have use it for test ours hardware.<br>
</div><div class="gmail_extra"><br></div><div class="gmail_extra">Steve.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2012/12/30 Ido Yariv <span dir="ltr"><<a href="mailto:ido@wizery.com" target="_blank">ido@wizery.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>That's actually not what I was concerned about. If<br>
hwspin_lock_register_single returns 0, anyone could potentially request<br>
and acquire that lock. If we then call hwspin_lock_tests it could<br>
potentially fail since the lock might already be acquired and the first<br>
call to trylock will not succeed.<br>
<br>
Since there's no real advantage in testing the locks after registering<br>
them, I suggest we keep the current implementation.<br>
</div></blockquote></div><br><br clear="all"><br>-- <br>Steve Zhan
</div></div>