All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Hank Janssen <hjanssen@microsoft.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix null pointer error after vmbus loading
Date: Wed, 21 Oct 2009 15:43:37 -0700	[thread overview]
Message-ID: <20091021224337.GA8550@suse.de> (raw)
In-Reply-To: <1FB5E1D5CA062146B38059374562DF72180B39CA@TK5EX14MBXC126.redmond.corp.microsoft.com>

On Wed, Oct 21, 2009 at 07:24:23PM +0000, Haiyang Zhang wrote:
> From: Haiyang Zhang <haiyangz@microsoft.com>
> 
> Fix null pointer error after vmbus loading.
> 
> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> 
> ---
> diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
> index 582318f..11431cc 100644
> --- a/drivers/staging/hv/vmbus_drv.c
> +++ b/drivers/staging/hv/vmbus_drv.c
> @@ -538,9 +538,10 @@ static int vmbus_child_device_register(struct hv_device *root_device_obj,
>                    child_device_ctx);
> 
>         /* Make sure we are not registered already */
> -       if (strlen(dev_name(&child_device_ctx->device)) != 0) {
> +       if (dev_name(&child_device_ctx->device) != NULL &&
> +           strlen(dev_name(&child_device_ctx->device)) != 0) {

Why would the device name ever be NULL?  Why would you need to check it
here?

confused,

greg k-h

       reply	other threads:[~2009-10-21 22:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1FB5E1D5CA062146B38059374562DF72180B39CA@TK5EX14MBXC126.redmond.corp.microsoft.com>
2009-10-21 22:43 ` Greg KH [this message]
2009-10-22 15:39   ` [PATCH] Fix null pointer error after vmbus loading Haiyang Zhang
2009-10-22 22:55     ` Greg KH
2009-10-23 16:22       ` Haiyang Zhang
2009-10-21 22:45 ` Greg KH

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=20091021224337.GA8550@suse.de \
    --to=gregkh@suse.de \
    --cc=haiyangz@microsoft.com \
    --cc=hjanssen@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.