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 @@ -380,7 +380,7 @@ static void *usnic_ib_device_add(struct pci_dev *dev)
380380 if (!us_ibdev ) {
381381 usnic_err ("Device %s context alloc failed\n" ,
382382 netdev_name (pci_get_drvdata (dev )));
383- return ERR_PTR ( - EFAULT ) ;
383+ return NULL ;
384384 }
385385
386386 us_ibdev -> ufdev = usnic_fwd_dev_alloc (dev );
@@ -500,8 +500,8 @@ static struct usnic_ib_dev *usnic_ib_discover_pf(struct usnic_vnic *vnic)
500500 }
501501
502502 us_ibdev = usnic_ib_device_add (parent_pci );
503- if (IS_ERR_OR_NULL ( us_ibdev ) ) {
504- us_ibdev = us_ibdev ? us_ibdev : ERR_PTR (- EFAULT );
503+ if (! us_ibdev ) {
504+ us_ibdev = ERR_PTR (- EFAULT );
505505 goto out ;
506506 }
507507
@@ -569,10 +569,10 @@ static int usnic_ib_pci_probe(struct pci_dev *pdev,
569569 }
570570
571571 pf = usnic_ib_discover_pf (vf -> vnic );
572- if (IS_ERR_OR_NULL (pf )) {
573- usnic_err ( "Failed to discover pf of vnic %s with err%ld\n" ,
574- pci_name ( pdev ), PTR_ERR ( pf ));
575- err = pf ? PTR_ERR ( pf ) : - EFAULT ;
572+ if (IS_ERR (pf )) {
573+ err = PTR_ERR ( pf );
574+ usnic_err ( "Failed to discover pf of vnic %s with err%d\n" ,
575+ pci_name ( pdev ), err ) ;
576576 goto out_clean_vnic ;
577577 }
578578
You can’t perform that action at this time.
0 commit comments