Commit 4eccbed8 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

Merge branch 'pci/endpoint'

- Use IS_ERR_OR_NULL() helper function instead of open-coding it (Ruan
  Jinjie)

* pci/endpoint:
  PCI: endpoint: Use IS_ERR_OR_NULL() helper function
parents 3c14a050 63a0b7dc
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ static int devm_pci_epc_match(struct device *dev, void *res, void *match_data)
 */
void pci_epc_put(struct pci_epc *epc)
{
	if (!epc || IS_ERR(epc))
	if (IS_ERR_OR_NULL(epc))
		return;

	module_put(epc->ops->owner);
@@ -660,7 +660,7 @@ void pci_epc_remove_epf(struct pci_epc *epc, struct pci_epf *epf,
	struct list_head *list;
	u32 func_no = 0;

	if (!epc || IS_ERR(epc) || !epf)
	if (IS_ERR_OR_NULL(epc) || !epf)
		return;

	if (type == PRIMARY_INTERFACE) {
@@ -691,7 +691,7 @@ void pci_epc_linkup(struct pci_epc *epc)
{
	struct pci_epf *epf;

	if (!epc || IS_ERR(epc))
	if (IS_ERR_OR_NULL(epc))
		return;

	mutex_lock(&epc->list_lock);
@@ -717,7 +717,7 @@ void pci_epc_linkdown(struct pci_epc *epc)
{
	struct pci_epf *epf;

	if (!epc || IS_ERR(epc))
	if (IS_ERR_OR_NULL(epc))
		return;

	mutex_lock(&epc->list_lock);
@@ -743,7 +743,7 @@ void pci_epc_init_notify(struct pci_epc *epc)
{
	struct pci_epf *epf;

	if (!epc || IS_ERR(epc))
	if (IS_ERR_OR_NULL(epc))
		return;

	mutex_lock(&epc->list_lock);
@@ -769,7 +769,7 @@ void pci_epc_bme_notify(struct pci_epc *epc)
{
	struct pci_epf *epf;

	if (!epc || IS_ERR(epc))
	if (IS_ERR_OR_NULL(epc))
		return;

	mutex_lock(&epc->list_lock);