diff options
author | Rahul Ruikar <rahul.ruikar@gmail.com> | 2010-10-26 17:22:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:14 -0400 |
commit | 10ad5278bbc961c9df8260f3e116d60eaaa3fb18 (patch) | |
tree | e1c1b0294512fa9bc1000078c33a9d35fe86d5a6 /drivers/misc | |
parent | ca1cab37d91cbe8a8333732540d43cabb54cfa85 (diff) |
drivers/misc/phantom.c: add missing warning messages in phantom_probe()
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/phantom.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/misc/phantom.c b/drivers/misc/phantom.c index 4197a3cb26ba..b05db55c8c8e 100644 --- a/drivers/misc/phantom.c +++ b/drivers/misc/phantom.c | |||
@@ -343,8 +343,10 @@ static int __devinit phantom_probe(struct pci_dev *pdev, | |||
343 | int retval; | 343 | int retval; |
344 | 344 | ||
345 | retval = pci_enable_device(pdev); | 345 | retval = pci_enable_device(pdev); |
346 | if (retval) | 346 | if (retval) { |
347 | dev_err(&pdev->dev, "pci_enable_device failed!\n"); | ||
347 | goto err; | 348 | goto err; |
349 | } | ||
348 | 350 | ||
349 | minor = phantom_get_free(); | 351 | minor = phantom_get_free(); |
350 | if (minor == PHANTOM_MAX_MINORS) { | 352 | if (minor == PHANTOM_MAX_MINORS) { |
@@ -356,8 +358,10 @@ static int __devinit phantom_probe(struct pci_dev *pdev, | |||
356 | phantom_devices[minor] = 1; | 358 | phantom_devices[minor] = 1; |
357 | 359 | ||
358 | retval = pci_request_regions(pdev, "phantom"); | 360 | retval = pci_request_regions(pdev, "phantom"); |
359 | if (retval) | 361 | if (retval) { |
362 | dev_err(&pdev->dev, "pci_request_regions failed!\n"); | ||
360 | goto err_null; | 363 | goto err_null; |
364 | } | ||
361 | 365 | ||
362 | retval = -ENOMEM; | 366 | retval = -ENOMEM; |
363 | pht = kzalloc(sizeof(*pht), GFP_KERNEL); | 367 | pht = kzalloc(sizeof(*pht), GFP_KERNEL); |