Skip to content

Commit 325ad20

Browse files
Dan Carpentergregkh
authored andcommitted
PCI: endpoint: pci-ep-msi: Fix NULL vs IS_ERR() check in pci_epf_write_msi_msg()
[ Upstream commit 57a75fa ] The pci_epc_get() function returns error pointers. It never returns NULL. Update the check to match. Fixes: 1c3b002 ("PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Manivannan Sadhasivam <[email protected]> Reviewed-by: Frank Li <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent e6ac2b8 commit 325ad20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/pci/endpoint/pci-ep-msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ static void pci_epf_write_msi_msg(struct msi_desc *desc, struct msi_msg *msg)
2424
struct pci_epf *epf;
2525

2626
epc = pci_epc_get(dev_name(msi_desc_to_dev(desc)));
27-
if (!epc)
27+
if (IS_ERR(epc))
2828
return;
2929

3030
epf = list_first_entry_or_null(&epc->pci_epf, struct pci_epf, list);

0 commit comments

Comments
 (0)