Re: [PATCH] USB: gadget: Fix a configfs return code
From: Lorenzo Colitti
Date: Mon Feb 15 2021 - 20:26:19 EST
On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> 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@xxxxxxxxxx>