From: Mauro Carvalho Chehab Date: Thu, 3 Sep 2009 02:43:33 +0000 (-0300) Subject: i7core_edac: Print an error message if pci register fails X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3ef288a98307adc9d3f83321b26281567f348ec6;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git i7core_edac: Print an error message if pci register fails Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c index 86037a601b5..26205e2efec 100644 --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -1743,7 +1743,13 @@ static int __init i7core_init(void) pci_rc = pci_register_driver(&i7core_driver); - return (pci_rc < 0) ? pci_rc : 0; + if (pci_rc >= 0) + return 0; + + i7core_printk(KERN_ERR, "Failed to register device with error %d.\n", + pci_rc); + + return pci_rc; } /*