summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget
diff options
context:
space:
mode:
authorSalah Triki <salah.triki@gmail.com>2021-07-31 20:18:38 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-08-05 13:31:27 +0300
commit90059e9395cae00d79ecb1f7e1e702756416bc6a (patch)
treece5abf976f7320f089d9d5d29fef2bd609bd6022 /drivers/usb/gadget
parent9311a531064be7e136e13df672959c635463be9e (diff)
downloadlinux-90059e9395cae00d79ecb1f7e1e702756416bc6a.tar.xz
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>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r--drivers/usb/gadget/function/f_fs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index cc9a11b7fec9..8260f38025b7 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -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);