lkml.org 
[lkml]   [2019]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] chardev: set variable ret to -EBUSY before checking minor range overlap
On Fri, Apr 05, 2019 at 09:53:06PM +0800, Chengguang Xu wrote:
> When allocating dynamic major, the minor range overlap check
> in __register_chrdev_region() will not fail, so actually
> there is no real case to passing non negative error code to
> caller. However, set variable ret to -EBUSY before chekcking
> minor range overlap will avoid false-positive warning from
> code analyzing tool(like Smatch) and also make the code more
> easy to understand.
>
> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
> fs/char_dev.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)

What tree was this patch made against? I can't seem to apply it
anywhere :(

Please fix up and resend.

thanks,

greg k-h

\
 
 \ /
  Last update: 2019-04-25 21:50    [W:0.034 / U:2.536 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site