drivers/misc/phantom.c: add missing warning messages in phantom_probe()
authorRahul Ruikar <rahul.ruikar@gmail.com>
Tue, 26 Oct 2010 21:22:35 +0000 (14:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Oct 2010 23:52:14 +0000 (16:52 -0700)
phantom_probe() can fail in many places.  Add missing warning messages in
pci_enable_device() and pci_request_regions().

Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/phantom.c

index 4197a3cb26ba42d674ef7d0935207adee0d70be1..b05db55c8c8e757c312184c797321942d814ec55 100644 (file)
@@ -343,8 +343,10 @@ static int __devinit phantom_probe(struct pci_dev *pdev,
        int retval;
 
        retval = pci_enable_device(pdev);
-       if (retval)
+       if (retval) {
+               dev_err(&pdev->dev, "pci_enable_device failed!\n");
                goto err;
+       }
 
        minor = phantom_get_free();
        if (minor == PHANTOM_MAX_MINORS) {
@@ -356,8 +358,10 @@ static int __devinit phantom_probe(struct pci_dev *pdev,
        phantom_devices[minor] = 1;
 
        retval = pci_request_regions(pdev, "phantom");
-       if (retval)
+       if (retval) {
+               dev_err(&pdev->dev, "pci_request_regions failed!\n");
                goto err_null;
+       }
 
        retval = -ENOMEM;
        pht = kzalloc(sizeof(*pht), GFP_KERNEL);