Thread (2 messages) 2 messages, 2 authors, 2021-02-16

Re: [PATCH] USB: gadget: Fix a configfs return code

From: Lorenzo Colitti <hidden>
Date: 2021-02-16 01:25:10
Also in: kernel-janitors, lkml

On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter [off-list ref] 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 <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help