All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	kernel-janitors@vger.kernel.org, xen-devel@lists.xenproject.org,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Xen-devel] [PATCH] ALSA: xen-front: freeing an error pointer
Date: Wed, 30 May 2018 11:20:40 +0000	[thread overview]
Message-ID: <s5h7enlo0dz.wl-tiwai@suse.de> (raw)
In-Reply-To: <588658f1-520f-be06-3ad5-9b97e3f8e866@gmail.com>

On Wed, 30 May 2018 13:14:58 +0200,
Oleksandr Andrushchenko wrote:
> 
> On 05/30/2018 01:36 PM, Dan Carpenter wrote:
> > kfree() doesn't accept error pointers so I've set "str" to NULL on these
> > paths.
> >
> > Fixes: fd3b36045c2c ("ALSA: xen-front: Read sound driver configuration from Xen store")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/sound/xen/xen_snd_front_cfg.c b/sound/xen/xen_snd_front_cfg.c
> > index 38c7e1eefbb9..68dcd7d1f09e 100644
> > --- a/sound/xen/xen_snd_front_cfg.c
> > +++ b/sound/xen/xen_snd_front_cfg.c
> > @@ -306,6 +306,7 @@ static int cfg_get_stream_type(const char *path, int index,
> >   	str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
> >   	if (IS_ERR(str)) {
> >   		ret = PTR_ERR(str);
> > +		str = NULL;
> >   		goto fail;
> >   	}
> >   @@ -347,6 +348,7 @@ static int cfg_stream(struct
> > xen_snd_front_info *front_info,
> >   	str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
> >   	if (IS_ERR(str)) {
> >   		ret = PTR_ERR(str);
> > +		str = NULL;
> >   		goto fail;
> >   	}
> >   
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xenproject.org
> > https://lists.xenproject.org/mailman/listinfo/xen-devel
> Thank you for your patch,
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Applied now.  Thanks.


Takashi

WARNING: multiple messages have this Message-ID (diff)
From: Takashi Iwai <tiwai@suse.de>
To: Oleksandr Andrushchenko <andr2000@gmail.com>
Cc: alsa-devel@alsa-project.org,
	Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>,
	kernel-janitors@vger.kernel.org, xen-devel@lists.xenproject.org,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [Xen-devel] [PATCH] ALSA: xen-front: freeing an error pointer
Date: Wed, 30 May 2018 13:20:40 +0200	[thread overview]
Message-ID: <s5h7enlo0dz.wl-tiwai@suse.de> (raw)
In-Reply-To: <588658f1-520f-be06-3ad5-9b97e3f8e866@gmail.com>

On Wed, 30 May 2018 13:14:58 +0200,
Oleksandr Andrushchenko wrote:
> 
> On 05/30/2018 01:36 PM, Dan Carpenter wrote:
> > kfree() doesn't accept error pointers so I've set "str" to NULL on these
> > paths.
> >
> > Fixes: fd3b36045c2c ("ALSA: xen-front: Read sound driver configuration from Xen store")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/sound/xen/xen_snd_front_cfg.c b/sound/xen/xen_snd_front_cfg.c
> > index 38c7e1eefbb9..68dcd7d1f09e 100644
> > --- a/sound/xen/xen_snd_front_cfg.c
> > +++ b/sound/xen/xen_snd_front_cfg.c
> > @@ -306,6 +306,7 @@ static int cfg_get_stream_type(const char *path, int index,
> >   	str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
> >   	if (IS_ERR(str)) {
> >   		ret = PTR_ERR(str);
> > +		str = NULL;
> >   		goto fail;
> >   	}
> >   @@ -347,6 +348,7 @@ static int cfg_stream(struct
> > xen_snd_front_info *front_info,
> >   	str = xenbus_read(XBT_NIL, stream_path, XENSND_FIELD_TYPE, NULL);
> >   	if (IS_ERR(str)) {
> >   		ret = PTR_ERR(str);
> > +		str = NULL;
> >   		goto fail;
> >   	}
> >   
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xenproject.org
> > https://lists.xenproject.org/mailman/listinfo/xen-devel
> Thank you for your patch,
> Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>

Applied now.  Thanks.


Takashi

  parent reply	other threads:[~2018-05-30 11:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-30 10:36 [PATCH] ALSA: xen-front: freeing an error pointer Dan Carpenter
2018-05-30 10:36 ` Dan Carpenter
2018-05-30 11:14 ` [Xen-devel] " Oleksandr Andrushchenko
2018-05-30 11:14   ` Oleksandr Andrushchenko
2018-05-30 11:20   ` Takashi Iwai
2018-05-30 11:20   ` Takashi Iwai [this message]
2018-05-30 11:20     ` [Xen-devel] " Takashi Iwai
2018-05-30 11:14 ` Oleksandr Andrushchenko

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=s5h7enlo0dz.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=andr2000@gmail.com \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=oleksandr_andrushchenko@epam.com \
    --cc=xen-devel@lists.xenproject.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.