Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1c52152b authored by Douglas Thompson's avatar Douglas Thompson Committed by Linus Torvalds
Browse files

drivers/edac: fix ignored return i82875p



Compiling this module gave a warning that the return value of
'pci_bus_add_device()' was not checked.

This patch adds that check and an output message

Signed-off-by: default avatarDouglas Thompson <dougthompson@xmission.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 654ede20
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
{
	struct pci_dev *dev;
	void __iomem *window;
	int err;

	*ovrfl_pdev = NULL;
	*ovrfl_window = NULL;
@@ -287,7 +288,12 @@ static int i82875p_setup_overfl_dev(struct pci_dev *pdev,
		if (dev == NULL)
			return 1;

		pci_bus_add_device(dev);
		err = pci_bus_add_device(dev);
		if (err) {
			i82875p_printk(KERN_ERR,
				"%s(): pci_bus_add_device() Failed\n",
				__func__);
		}
	}

	*ovrfl_pdev = dev;