All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Jan Beulich <JBeulich-IBi9RG/b67k@public.gmane.org>
Cc: Juergen Gross <JGross-IBi9RG/b67k@public.gmane.org>,
	"tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
	<tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org,
	xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org,
	boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] xen-tpmfront: correct return value check on xenbus_scanf()
Date: Thu, 7 Jul 2016 13:35:54 +0300	[thread overview]
Message-ID: <20160707103554.GA13244@intel.com> (raw)
In-Reply-To: <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>

On Thu, Jul 07, 2016 at 02:04:00AM -0600, Jan Beulich wrote:
> Only a positive return value indicates success.
> 
> Signed-off-by: Jan Beulich <jbeulich-IBi9RG/b67k@public.gmane.org>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

/Jarkko

> ---
>  drivers/char/tpm/xen-tpmfront.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --- 4.7-rc6-xenbus_scanf.orig/drivers/char/tpm/xen-tpmfront.c
> +++ 4.7-rc6-xenbus_scanf/drivers/char/tpm/xen-tpmfront.c
> @@ -344,7 +344,7 @@ static void backend_changed(struct xenbu
>  			break;
>  
>  		if (xenbus_scanf(XBT_NIL, dev->otherend,
> -				"feature-protocol-v2", "%d", &val) < 0)
> +				"feature-protocol-v2", "%d", &val) <= 0)
>  			val = 0;
>  		if (!val) {
>  			xenbus_dev_fatal(dev, -EINVAL,
> 
> 
> 

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape

  parent reply	other threads:[~2016-07-07 10:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-07  8:04 [PATCH] xen-tpmfront: correct return value check on xenbus_scanf() Jan Beulich
2016-07-07 10:35 ` Jarkko Sakkinen
     [not found] ` <577E291002000078000FBF18-rw/UEucdPrvD8XXLLHKrIiOjQekVJEpY@public.gmane.org>
2016-07-07 10:35   ` Jarkko Sakkinen [this message]
2016-07-07 10:38     ` Jarkko Sakkinen
2016-07-07 10:38     ` Jarkko Sakkinen
2016-07-07 12:00       ` Jan Beulich
     [not found]       ` <20160707103859.GA13815-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2016-07-07 12:00         ` Jan Beulich
2016-07-07 12:00           ` Jan Beulich
2016-07-07 12:21           ` Jarkko Sakkinen
2016-07-07 12:21           ` Jarkko Sakkinen

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=20160707103554.GA13244@intel.com \
    --to=jarkko.sakkinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
    --cc=JBeulich-IBi9RG/b67k@public.gmane.org \
    --cc=JGross-IBi9RG/b67k@public.gmane.org \
    --cc=boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.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.