mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Wei Yongjun <weiyj.lk@gmail.com>
Cc: clemens@ladisch.de, perex@perex.cz,
	yongjun_wei@trendmicro.com.cn, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: firewire: fix error return code in scs_probe()
Date: Tue, 18 Jun 2013 16:17:21 +0200	[thread overview]
Message-ID: <s5h1u7zlczy.wl%tiwai@suse.de> (raw)
In-Reply-To: <CAPgLHd-HMw40igirFvFHtN3HNy2utXHVAVERxKQ-vwF9ecUaSw@mail.gmail.com>

At Tue, 18 Jun 2013 21:09:42 +0800,
Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return -ENOMEM in the kmalloc() error handling
> case instead of 0, as done elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks, applied with ack by Clemens.


Takashi

> ---
>  sound/firewire/scs1x.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/firewire/scs1x.c b/sound/firewire/scs1x.c
> index 844a555..b252c21 100644
> --- a/sound/firewire/scs1x.c
> +++ b/sound/firewire/scs1x.c
> @@ -405,8 +405,10 @@ static int scs_probe(struct device *unit_dev)
>  	scs->output_idle = true;
>  
>  	scs->buffer = kmalloc(HSS1394_MAX_PACKET_SIZE, GFP_KERNEL);
> -	if (!scs->buffer)
> +	if (!scs->buffer) {
> +		err = -ENOMEM;
>  		goto err_card;
> +	}
>  
>  	scs->hss_handler.length = HSS1394_MAX_PACKET_SIZE;
>  	scs->hss_handler.address_callback = handle_hss;
> 

      parent reply	other threads:[~2013-06-18 14:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 13:09 Wei Yongjun
2013-06-18 14:02 ` Clemens Ladisch
2013-06-18 14:17 ` Takashi Iwai [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=s5h1u7zlczy.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=weiyj.lk@gmail.com \
    --cc=yongjun_wei@trendmicro.com.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®