Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: gadget: remove useless cast

Remove the cast done by ERR_PTR() and PTR_ERR() since data is of type char
* and fss_prepare_buffer() should returns a value of this type.

Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Salah Triki <salah.triki@gmail.com>
Link: https://lore.kernel.org/r/20210731171838.GA912463@pc
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Salah Triki and committed by
Greg Kroah-Hartman
90059e93 9311a531

+1 -1
+1 -1
drivers/usb/gadget/function/f_fs.c
··· 3831 3831 3832 3832 data = memdup_user(buf, len); 3833 3833 if (IS_ERR(data)) 3834 - return ERR_PTR(PTR_ERR(data)); 3834 + return data; 3835 3835 3836 3836 pr_vdebug("Buffer from user space:\n"); 3837 3837 ffs_dump_mem("", data, len);