Re: [PATCH] usb: use mutex_lock in iowarrior_read()

Oliver Neukum
2024-09-17T16:02:46Z

On 17.09.24 17:41, Jeongjun Park wrote:

Hi,

comments in line.

> ---
> drivers/usb/misc/iowarrior.c | 46 ++++++++++++++++++++++++++++--------
> 1 file changed, 36 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/usb/misc/iowarrior.c b/drivers/usb/misc/iowarrior.c
> index 6d28467ce352..dbf0ed04f7c3 100644
> --- a/drivers/usb/misc/iowarrior.c
> +++ b/drivers/usb/misc/iowarrior.c
> @@ -277,28 +277,45 @@ static ssize_t iowarrior_read(struct file *file, char __user *buffer,
> struct iowarrior *dev;
> int read_idx;
> int offset;
> + int retval = 0;

Initialization is useless.

The rest is fine.

Regards
Oliver