File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
drivers/infiniband/hw/usnic Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,7 @@ static void *usnic_ib_device_add(struct pci_dev *dev)
397397 if (!us_ibdev ) {
398398 usnic_err ("Device %s context alloc failed\n" ,
399399 netdev_name (pci_get_drvdata (dev )));
400- return ERR_PTR ( - EFAULT ) ;
400+ return NULL ;
401401 }
402402
403403 us_ibdev -> ufdev = usnic_fwd_dev_alloc (dev );
@@ -517,8 +517,8 @@ static struct usnic_ib_dev *usnic_ib_discover_pf(struct usnic_vnic *vnic)
517517 }
518518
519519 us_ibdev = usnic_ib_device_add (parent_pci );
520- if (IS_ERR_OR_NULL ( us_ibdev ) ) {
521- us_ibdev = us_ibdev ? us_ibdev : ERR_PTR (- EFAULT );
520+ if (! us_ibdev ) {
521+ us_ibdev = ERR_PTR (- EFAULT );
522522 goto out ;
523523 }
524524
@@ -586,10 +586,10 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev,
586586 }
587587
588588 pf = usnic_ib_discover_pf (vf -> vnic );
589- if (IS_ERR_OR_NULL (pf )) {
590- usnic_err ( "Failed to discover pf of vnic %s with err%ld\n" ,
591- pci_name ( pdev ), PTR_ERR ( pf ));
592- err = pf ? PTR_ERR ( pf ) : - EFAULT ;
589+ if (IS_ERR (pf )) {
590+ err = PTR_ERR ( pf );
591+ usnic_err ( "Failed to discover pf of vnic %s with err%d\n" ,
592+ pci_name ( pdev ), err ) ;
593593 goto out_clean_vnic ;
594594 }
595595
You can’t perform that action at this time.
0 commit comments