Commit d7553443 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

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

From: "Luiz Fernando N. Capitulino" <lcapitulino@prefeitura.sp.gov.br>

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()).
parent 0610d50c
......@@ -1572,7 +1572,7 @@ static u32 board_added(struct pci_func * func, struct controller * ctrl)
retval = p_slot->hpc_ops->check_cmd_status(ctrl);
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 */
up(&ctrl->crit_sect);
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