lkml.org 
[lkml]   [2021]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] USB: gadget: Fix a configfs return code
On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter <dan.carpenter@oracle.com> wrote:
> { \
> struct f_##_f_##_opts *opts = to_f_##_f_##_opts(item); \
> - int ret; \
> + int ret = -EINVAL; \
> u8 val; \
> \
> mutex_lock(&opts->lock); \
> - ret = sscanf(page, "%02hhx", &val); \
> - if (ret > 0) { \
> + if (sscanf(page, "%02hhx", &val) > 0) { \
> opts->_n_ = val; \
> ret = len; \
> } \

Acked-by: Lorenzo Colitti <lorenzo@google.com>

\
 
 \ /
  Last update: 2021-02-16 02:26    [W:0.024 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site