Skip to content

Commit a99e5c8

Browse files
Chenguang Zhaogregkh
authored andcommitted
staging: rtl8723bs: Cleanups for rtw_inc_and_chk_continual_io_error
There's a warning when using checkpatch.pl check rtw_io.c: WARNING: Missing a blank line after declarations 146: FILE: drivers/staging/rtl8723bs/core/rtw_io.c:146: int value = atomic_inc_return(&dvobj->continual_io_error); if (value > MAX_CONTINUAL_IO_ERR) The patch fixes it. In addition, also rename 'value' variable to 'error_count' and drop 'ret' variable. Signed-off-by: Chenguang Zhao <[email protected]> Reviewed-by: Dan Carpenter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f9e7f3f commit a99e5c8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/staging/rtl8723bs/core/rtw_io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct adapt
141141
*/
142142
int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
143143
{
144-
int ret = false;
145-
int value = atomic_inc_return(&dvobj->continual_io_error);
146-
if (value > MAX_CONTINUAL_IO_ERR)
147-
ret = true;
144+
int error_count = atomic_inc_return(&dvobj->continual_io_error);
148145

149-
return ret;
146+
if (error_count > MAX_CONTINUAL_IO_ERR)
147+
return true;
148+
149+
return false;
150150
}
151151

152152
/*

0 commit comments

Comments
 (0)