usb: gadget: remove useless cast
PATCH 1/1 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.
Signed-off-by Salah Triki <[email protected]>
--- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/function/f_fs.c +1 -1
@@ -3831,7 +3831,7 @@ static char *ffs_prepare_buffer(const char __user *buf, size_t len) data =memdup_user (buf, len);if (IS_ERR (data)) -return ERR_PTR (PTR_ERR (data)); +return data;pr_vdebug ("Buffer from user space:\n" );ffs_dump_mem ("" , data, len);
Signature · 1 line
2.25.1
Quoted 4 lines · Salah Triki
Remove the cast done by
ERR_PTR()andPTR_ERR()since data is of type char
* andfss_prepare_buffer()should returns a value of this type.Signed-off-by Salah Triki <[email protected]>
Acked-by Felipe Balbi <[email protected]>
Signature · 1 line
balbi