Re: [PATCH 1/5] blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-23 Thread Johannes Thumshirn
On Mon, Jan 23, 2017 at 11:00:15AM +0100, SF Markus Elfring wrote: > >> @@ -1327,27 +1327,30 @@ static ssize_t tg_set_max(struct kernfs_open_file > >> *of, > >>break; > >>ctx.body += len; > >> > >> - ret = -EINVAL; > >>p = tok; > >>

Re: [PATCH 1/5] blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-23 Thread Johannes Thumshirn
On Sun, Jan 22, 2017 at 09:31:29AM +0100, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 21 Jan 2017 21:23:06 +0100 > > A local variable was set to an error code before a concrete error situation > was detected. Thus move the corresponding assignments

[PATCH 1/5] blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-22 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 21 Jan 2017 21:23:06 +0100 A local variable was set to an error code before a concrete error situation was detected. Thus move the corresponding assignments into if branches to indicate a software failure there. Signed-off-by: