mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
PCI: endpoint: pci-ep-msi: Fix NULL vs IS_ERR() check in pci_epf_write_msi_msg()
The pci_epc_get() function returns error pointers. It never returns NULL.
Update the check to match.
Fixes: 1c3b002c6b ("PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/aIzCdV8jyBeql-Oa@stanley.mountain
This commit is contained in:
committed by
Manivannan Sadhasivam
parent
8f5ae30d69
commit
57a75fa9d5
@@ -24,7 +24,7 @@ static void pci_epf_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
|
||||
struct pci_epf *epf;
|
||||
|
||||
epc = pci_epc_get(dev_name(msi_desc_to_dev(desc)));
|
||||
if (!epc)
|
||||
if (IS_ERR(epc))
|
||||
return;
|
||||
|
||||
epf = list_first_entry_or_null(&epc->pci_epf, struct pci_epf, list);
|
||||
|
||||
Reference in New Issue
Block a user