Message ID | 1349469667-6137-2-git-send-email-peter.senna@gmail.com |
---|---|
State | Accepted, archived |
Headers | show |
Peter Senna Tschudin <peter.senna@gmail.com> : [...] > The function natsemi_probe1() return 0 for success and negative value > for most of its internal tests failures. There is one exception > that is error case going to err_create_file:. Fore this error case the > function abort its success execution path, but returns non negative value, > making it difficult for a caller function to notice the error. Ok. natsemi_probe1() forgets to return a negative status code in one of its failure paths. [...] > Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
Applied. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/ethernet/natsemi/natsemi.c b/drivers/net/ethernet/natsemi/natsemi.c index 5b61d12..dbaaa99 100644 --- a/drivers/net/ethernet/natsemi/natsemi.c +++ b/drivers/net/ethernet/natsemi/natsemi.c @@ -947,8 +947,8 @@ static int __devinit natsemi_probe1 (struct pci_dev *pdev, i = register_netdev(dev); if (i) goto err_register_netdev; - - if (NATSEMI_CREATE_FILE(pdev, dspcfg_workaround)) + i = NATSEMI_CREATE_FILE(pdev, dspcfg_workaround); + if (i) goto err_create_file; if (netif_msg_drv(np)) {