[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAKD1Yr3Gpa4KZXzWDMO4-V-+16FCYPb4nUZMLde+cQLk+zRxaQ@mail.gmail.com>
Date: Tue, 16 Feb 2021 10:23:52 +0900
From: Lorenzo Colitti <lorenzo@...gle.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nishad Kamdar <nishadkamdar@...il.com>,
David Lechner <david@...hnology.com>,
linux-usb@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] USB: gadget: Fix a configfs return code
On Tue, Feb 16, 2021 at 12:57 AM Dan Carpenter <dan.carpenter@...cle.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@...gle.com>
Powered by blists - more mailing lists