Re: [PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-29 Thread Lorenzo Pieralisi
On Mon, Mar 25, 2019 at 05:19:09PM -0500, Kangjie Lu wrote: > If __get_free_pages() fails, the patch returns -ENOMEM to avoid > NULL pointer dereference. > > Signed-off-by: Kangjie Lu > --- > v3: remove "unlikely", as suggested by Bjorn Helgaas. > v2: caller is redefined to accept the error

Re: [PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-27 Thread Mukesh Ojha
On 3/26/2019 3:49 AM, Kangjie Lu wrote: If __get_free_pages() fails, the patch returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu Reviewed-by: Mukesh Ojha -Mukesh --- v3: remove "unlikely", as suggested by Bjorn Helgaas. v2: caller is redefined to accept the

Re: [PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-26 Thread Steven Price
On 25/03/2019 22:19, Kangjie Lu wrote: > If __get_free_pages() fails, the patch returns -ENOMEM to avoid As Bjorn suggested s/the patch returns/return/ would suffice and is slightly easier to read. But I'm happy either way. > NULL pointer dereference. > > Signed-off-by: Kangjie Lu

[PATCH v3] PCI: xilinx: Check for __get_free_pages() failure

2019-03-25 Thread Kangjie Lu
If __get_free_pages() fails, the patch returns -ENOMEM to avoid NULL pointer dereference. Signed-off-by: Kangjie Lu --- v3: remove "unlikely", as suggested by Bjorn Helgaas. v2: caller is redefined to accept the error code, as suggested by Steven Price --- drivers/pci/controller/pcie-xilinx.c