Skip to content

Commit 754834b

Browse files
Quentin Lambertbjorn-helgaas
Quentin Lambert
authored andcommitted
PCI: Simplify if-return sequences
Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Quentin Lambert <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]>
1 parent ff0387c commit 754834b

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

drivers/pci/hotplug/ibmphp_res.c

+1-4
Original file line numberDiff line numberDiff line change
@@ -376,10 +376,7 @@ int __init ibmphp_rsrc_init (void)
376376
if (rc)
377377
return rc;
378378
}
379-
rc = once_over (); /* This is to align ranges (so no -1) */
380-
if (rc)
381-
return rc;
382-
return 0;
379+
return once_over (); /* This is to align ranges (so no -1) */
383380
}
384381

385382
/********************************************************************************

drivers/pci/pci.c

+1-5
Original file line numberDiff line numberDiff line change
@@ -1012,11 +1012,7 @@ int pci_save_state(struct pci_dev *dev)
10121012
if (i != 0)
10131013
return i;
10141014

1015-
i = pci_save_vc_state(dev);
1016-
if (i != 0)
1017-
return i;
1018-
1019-
return 0;
1015+
return pci_save_vc_state(dev);
10201016
}
10211017
EXPORT_SYMBOL(pci_save_state);
10221018

0 commit comments

Comments
 (0)