From: Jiri Slaby <jirislaby@gmail.com>
To: Rahul Ruikar <rahul.ruikar@gmail.com>
Cc: ak@linux.intel.com, adobriyan@gmail.com,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc: phantom: Added missing warning messages in phantom_probe
Date: Sun, 26 Sep 2010 12:26:01 +0300 [thread overview]
Message-ID: <4C9F11A9.7040808@gmail.com> (raw)
In-Reply-To: <1285422505-7128-1-git-send-email-rahul.ruikar@gmail.com>
On 09/25/2010 04:48 PM, Rahul Ruikar wrote:
> phantom_probe can fail at many places. missing warning messages
> have been added for 2 cases.
> pci_enable_device()
> pci_request_regions()
>
> Signed-off-by: Rahul Ruikar <rahul.ruikar@gmail.com>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Andrew, could you take it?
> ---
> 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 75ee0d3..b4c105f 100644
> --- a/drivers/misc/phantom.c
> +++ b/drivers/misc/phantom.c
> @@ -341,8 +341,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) {
> @@ -354,8 +356,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);
thanks,
--
js
prev parent reply other threads:[~2010-09-26 9:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-25 13:48 [PATCH] misc: phantom: Added missing warning messages in phantom_probe Rahul Ruikar
2010-09-25 14:15 ` Rahul Ruikar
2010-09-25 15:04 ` Greg KH
2010-09-25 17:27 ` Rahul Ruikar
2010-09-25 17:34 ` Greg KH
2010-09-26 9:26 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C9F11A9.7040808@gmail.com \
--to=jirislaby@gmail.com \
--cc=adobriyan@gmail.com \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rahul.ruikar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.