mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Insu Yun <wuninsu@gmail.com>
Cc: perex@perex.cz, tiwai@suse.com, michael@gernoth.net,
	lambert.quentin@gmail.com, pzubaj@marticonet.sk,
	alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
	yeongjin.jang@gatech.edu, taesoo@gatech.edu, insu@gatech.edu,
	changwoo@gatech.edu
Subject: Re: [alsa-devel] [PATCH v2] emu10k1: correctly handling failed thread	creation
Date: Fri, 29 Jan 2016 17:31:04 +0100	[thread overview]
Message-ID: <s5h8u38mjp3.wl-tiwai@suse.de> (raw)
In-Reply-To: <1454082971-12873-1-git-send-email-wuninsu@gmail.com>

On Fri, 29 Jan 2016 16:56:11 +0100,
Insu Yun wrote:
> 
> Since kthread_create can be failed, it needs to check
> whether error occurred and return error code.
> 
> Signed-off-by: Insu Yun <wuninsu@gmail.com>

Applied, thanks.


Takashi

> ---
>  sound/pci/emu10k1/emu10k1_main.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
> index 28e2f8b..8914534 100644
> --- a/sound/pci/emu10k1/emu10k1_main.c
> +++ b/sound/pci/emu10k1/emu10k1_main.c
> @@ -1141,6 +1141,14 @@ static int snd_emu10k1_emu1010_init(struct snd_emu10k1 *emu)
>  		emu->emu1010.firmware_thread =
>  			kthread_create(emu1010_firmware_thread, emu,
>  				       "emu1010_firmware");
> +		if (IS_ERR(emu->emu1010.firmware_thread)) {
> +			err = PTR_ERR(emu->emu1010.firmware_thread);
> +			emu->emu1010.firmware_thread = NULL;
> +			dev_info(emu->card->dev,
> +					"emu1010: Creating thread failed\n");
> +			return err;
> +		}
> +
>  		wake_up_process(emu->emu1010.firmware_thread);
>  	}
>  
> -- 
> 1.9.1
> 
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
> 

      reply	other threads:[~2016-01-29 16:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 15:56 Insu Yun
2016-01-29 16:31 ` 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=s5h8u38mjp3.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=changwoo@gatech.edu \
    --cc=insu@gatech.edu \
    --cc=lambert.quentin@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@gernoth.net \
    --cc=perex@perex.cz \
    --cc=pzubaj@marticonet.sk \
    --cc=taesoo@gatech.edu \
    --cc=tiwai@suse.com \
    --cc=wuninsu@gmail.com \
    --cc=yeongjin.jang@gatech.edu \
    /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®