Commit 1c52152b3008b7bdcc3b94d0be4d0b814dce1530
Committed by
Linus Torvalds
1 parent
654ede200f
Exists in
master
and in
7 other branches
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: Douglas Thompson <dougthompson@xmission.com> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 7 additions and 1 deletions Side-by-side Diff
drivers/edac/i82875p_edac.c
... | ... | @@ -270,6 +270,7 @@ |
270 | 270 | { |
271 | 271 | struct pci_dev *dev; |
272 | 272 | void __iomem *window; |
273 | + int err; | |
273 | 274 | |
274 | 275 | *ovrfl_pdev = NULL; |
275 | 276 | *ovrfl_window = NULL; |
... | ... | @@ -287,7 +288,12 @@ |
287 | 288 | if (dev == NULL) |
288 | 289 | return 1; |
289 | 290 | |
290 | - pci_bus_add_device(dev); | |
291 | + err = pci_bus_add_device(dev); | |
292 | + if (err) { | |
293 | + i82875p_printk(KERN_ERR, | |
294 | + "%s(): pci_bus_add_device() Failed\n", | |
295 | + __func__); | |
296 | + } | |
291 | 297 | } |
292 | 298 | |
293 | 299 | *ovrfl_pdev = dev; |