diff mbox

[3/3] edac: remove the unnecessary checking for pci_bus_add_device

Message ID 1401346866-11648-4-git-send-email-wangyijing@huawei.com
State Superseded
Headers show

Commit Message

Yijing Wang May 29, 2014, 7:01 a.m. UTC
Pci_bus_add_device() always return 0, remove the unnecessary
checking for pci_bus_add_device().

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
 drivers/edac/i82875p_edac.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

Comments

Yinghai Lu May 29, 2014, 10:13 p.m. UTC | #1
On Thu, May 29, 2014 at 12:01 AM, Yijing Wang <wangyijing@huawei.com> wrote:
> Pci_bus_add_device() always return 0, remove the unnecessary
> checking for pci_bus_add_device().
>
> Signed-off-by: Yijing Wang <wangyijing@huawei.com>
> ---
>  drivers/edac/i82875p_edac.c |    7 +------
>  1 files changed, 1 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
> index 8d0450b..8705ba6 100644
> --- a/drivers/edac/i82875p_edac.c
> +++ b/drivers/edac/i82875p_edac.c
> @@ -293,12 +293,7 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
>                 if (dev == NULL)
>                         return 1;
>
> -               err = pci_bus_add_device(dev);
> -               if (err) {
> -                       i82875p_printk(KERN_ERR,
> -                               "%s(): pci_bus_add_device() Failed\n",
> -                               __func__);
> -               }
> +               pci_bus_add_device(dev);
>                 pci_bus_assign_resources(dev->bus);
>         }

Bjorn,

At same time, can you please apply

http://patchwork.ozlabs.org/patch/242480/

PCI, EDAC: fix ordering assign resource and bus_add

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 8d0450b..8705ba6 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -293,12 +293,7 @@  static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
 		if (dev == NULL)
 			return 1;
 
-		err = pci_bus_add_device(dev);
-		if (err) {
-			i82875p_printk(KERN_ERR,
-				"%s(): pci_bus_add_device() Failed\n",
-				__func__);
-		}
+		pci_bus_add_device(dev);
 		pci_bus_assign_resources(dev->bus);
 	}