lkml.org 
[lkml]   [2013]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] i2o: add missing destroy_workqueue() on error in i2o_driver_register()
On Mon, 23 Sep 2013 17:56:56 +0800 Wei Yongjun <weiyj.lk@gmail.com> wrote:

> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing destroy_workqueue() before return from
> i2o_driver_register() in the error handling case.

yup.

> --- a/drivers/message/i2o/driver.c
> +++ b/drivers/message/i2o/driver.c
> @@ -105,7 +105,8 @@ int i2o_driver_register(struct i2o_driver *drv)
> osm_err("too many drivers registered, increase "
> "max_drivers\n");
> spin_unlock_irqrestore(&i2o_drivers_lock, flags);
> - return -EFAULT;
> + rc = -EFAULT;

Why on earth does this function return -EFAULT (twice)? Imagine the poor
user's confusion if that code gets propagated back to his application
or shell.



\
 
 \ /
  Last update: 2013-09-25 02:01    [W:0.045 / U:1.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site