Skip to content

Commit

Permalink
usb: gadget: remove useless cast
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Salah Triki authored and Greg Kroah-Hartman committed Aug 5, 2021
1 parent 9311a53 commit 90059e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/function/f_fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 90059e9

Please sign in to comment.