[...]
On 11/6/2019 8:24 PM, Andy Shevchenko wrote:
On Wed, Nov 06, 2019 at 11:44:02AM +0800, Dilip Kota wrote:
I ran test with all the changes and kernel panic is hit due to NULL pointer access. It is because of platform_set_drvdata() moved before dev_info, which resulted in intel_pcie_get_resources() doing platform_get_drvdata and end up accessing NULL pointer. I will keep 'platform_set_drvdata()' remain unchanged.I have done it immediately after the memory allocation.
+ÂÂÂ return ret;I think it makes sense to setup at the end of the function (before dev_info()
+}
+ÂÂÂ platform_set_drvdata(pdev, lpp);
call).
Ok, i will move it before dev_info().