Commit 86ff0b3f authored by Luiz Capitulino's avatar Luiz Capitulino Committed by Deepak Saxena

[PATCH] PCI Hotplug: fix wrong var used in hotplug/shpchp_ctrl.c.

Zhenmin's checker tool <zli4@cs.uiuc.edu> detected this:

 9. /drivers/pci/hotplug/shpchp_ctrl.c, Line 1575:
 err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__, rc);

 Maybe change to:
 err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__,
 retval);

 I think it is right because at line 1564, the slot is turned off, and
in this line (1575) is checked the status to see if we got an error; if
so, the error number is shown. This number is in 'retval', not in 'rc'
('rc' does have the return of configure_new_device()).

 The patch bellow fixes that:
parent 08c7b59b
...@@ -1573,7 +1573,7 @@ static u32 board_added(struct pci_func * func, struct controller * ctrl) ...@@ -1573,7 +1573,7 @@ static u32 board_added(struct pci_func * func, struct controller * ctrl)
retval = p_slot->hpc_ops->check_cmd_status(ctrl); retval = p_slot->hpc_ops->check_cmd_status(ctrl);
if (retval) { if (retval) {
err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__, rc); err("%s: Failed to disable slot, error code(%d)\n", __FUNCTION__, retval);
/* Done with exclusive hardware access */ /* Done with exclusive hardware access */
up(&ctrl->crit_sect); up(&ctrl->crit_sect);
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment