Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1324811
| From | Ed Cashin <ed.cashin@acm.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] aoe: remove unnecessary check for failing kthread creation |
| Date | 2016-02-03 02:40 +0100 |
| Message-ID | <qXUAi-3B6-17@gated-at.bofh.it> (permalink) |
| References | <qXp3t-50K-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 02/01/2016 10:53 AM, Insu Yun wrote: > When kthread_run fails, it returns ERR, not NULL. > Therefore, NULL checking is redundant. > (https://www.kernel.org/doc/htmldocs/device-drivers/API-kthread-run.html) Thanks, the change looks reasonable. ... > task = kthread_run(kthread, k, "%s", k->name); > - if (task == NULL || IS_ERR(task)) > + if (IS_ERR(task)) > return -ENOMEM; Interestingly, after this change, it's more clear that returning -ENOMEM is a bit misleading when the underlying kernel/kthread.c function, kthread_create_on_node returns ERR_PTR(-EINTR). But because that would happen when the process we need to have the driver working gets killed, I'm not sure it matters. -- Ed
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] aoe: remove unnecessary check for failing kthread creation Insu Yun <wuninsu@gmail.com> - 2016-02-01 17:00 +0100 Re: [PATCH] aoe: remove unnecessary check for failing kthread creation Ed Cashin <ed.cashin@acm.org> - 2016-02-03 02:40 +0100
csiph-web