Re: [PATCH] usb: gadget: f_fs: remove unused values and add immediate returns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 06, 2024 at 07:30:32PM +0100, Karol Przybylski wrote:
> In case of faulty copy_from_user call inside ffs_epfile_ioctl, error code is
> saved in a variable. However, this variable is later overwritten in every possible
> path, which overshadows initial assignment.
> 
> This patch fixes it by returning the error code immediately and exiting the function.
> 
> Error discovered in coverity scan - CID 1583682
> 
> Signed-off-by: Karol Przybylski <karprzy7@xxxxxxxxx>
> ---
>  drivers/usb/gadget/function/f_fs.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)

What commit id does this fix?

How was this change tested?

thanks,

greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux