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)
397
397
if (!us_ibdev ) {
398
398
usnic_err ("Device %s context alloc failed\n" ,
399
399
netdev_name (pci_get_drvdata (dev )));
400
- return ERR_PTR ( - EFAULT ) ;
400
+ return NULL ;
401
401
}
402
402
403
403
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)
517
517
}
518
518
519
519
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 );
522
522
goto out ;
523
523
}
524
524
@@ -586,10 +586,10 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev,
586
586
}
587
587
588
588
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 ) ;
593
593
goto out_clean_vnic ;
594
594
}
595
595
You can’t perform that action at this time.
0 commit comments