<br><br>On Thursday, August 12, 2021, Evgeny Novikov <<a href="mailto:novikov@ispras.ru">novikov@ispras.ru</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It seems that mxic_nfc_probe() missed invocation of<br>
mxic_nfc_clk_enable(). The patch fixed that. In addition, error handling<br>
was refined appropriately.</blockquote><div><br></div><div>NAK. Until you provide a deeper analysis, like how this works before your change. </div><div><br></div><div><br></div><div>Please, don’t blindly generate patches, this can even your bot do, just think about each change and preferable test on the real hardware.</div><div><br></div><div>The above is to all your lovely contributions. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Found by Linux Driver Verification project (<a href="http://linuxtesting.org" target="_blank">linuxtesting.org</a>).<br>
<br>
Signed-off-by: Evgeny Novikov <<a href="mailto:novikov@ispras.ru">novikov@ispras.ru</a>><br>
Co-developed-by: Kirill Shilimanov <<a href="mailto:kirill.shilimanov@huawei.com">kirill.shilimanov@huawei.com</a>><br>
Signed-off-by: Kirill Shilimanov <<a href="mailto:kirill.shilimanov@huawei.com">kirill.shilimanov@huawei.com</a>><br>
---<br>
 drivers/mtd/nand/raw/mxic_<wbr>nand.c | 16 ++++++++++++----<br>
 1 file changed, 12 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/drivers/mtd/nand/raw/mxic_<wbr>nand.c b/drivers/mtd/nand/raw/mxic_<wbr>nand.c<br>
index da1070993994..37e75bf60ee5 100644<br>
--- a/drivers/mtd/nand/raw/mxic_<wbr>nand.c<br>
+++ b/drivers/mtd/nand/raw/mxic_<wbr>nand.c<br>
@@ -509,9 +509,15 @@ static int mxic_nfc_probe(struct platform_device *pdev)<br>
        if (IS_ERR(nfc->send_dly_clk))<br>
                return PTR_ERR(nfc->send_dly_clk);<br>
<br>
+       err = mxic_nfc_clk_enable(nfc);<br>
+       if (err)<br>
+               return err;<br>
+<br>
        nfc->regs = devm_platform_ioremap_<wbr>resource(pdev, 0);<br>
-       if (IS_ERR(nfc->regs))<br>
-               return PTR_ERR(nfc->regs);<br>
+       if (IS_ERR(nfc->regs)) {<br>
+               err = PTR_ERR(nfc->regs);<br>
+               goto fail;<br>
+       }<br>
<br>
        nand_chip = &nfc->chip;<br>
        mtd = nand_to_mtd(nand_chip);<br>
@@ -527,8 +533,10 @@ static int mxic_nfc_probe(struct platform_device *pdev)<br>
        nand_chip->controller = &nfc->controller;<br>
<br>
        irq = platform_get_irq(pdev, 0);<br>
-       if (irq < 0)<br>
-               return irq;<br>
+       if (irq < 0) {<br>
+               err = irq;<br>
+               goto fail;<br>
+       }<br>
<br>
        mxic_nfc_hw_init(nfc);<br>
 <br>
-- <br>
2.26.2<br>
<br>
</blockquote><br><br>-- <br>With Best Regards,<br>Andy Shevchenko<br><br><br>