Re: [PATCH v5 2/3] dwc: PCI: intel: PCIe RC controller driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/11/2019 4:08 PM, Dilip Kota wrote:

On 11/6/2019 8:24 PM, Andy Shevchenko wrote:
On Wed, Nov 06, 2019 at 11:44:02AM +0800, Dilip Kota wrote:
[...]

+    return ret;
+}
+    platform_set_drvdata(pdev, lpp);
I think it makes sense to setup at the end of the function (before dev_info()
call).
I have done it immediately after the memory allocation.
Ok, i will move it before dev_info().

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.

Regards,
Dilip



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux