Fs: Btrfs - Fix possible ERR_PTR() dereferencing.

2016-09-19 Thread Shailendra Verma
This is of course wrong to call kfree() if memdup_user() fails, no memory was allocated and the error in the error-valued pointer should be returned. Reviewed-by: Ravikant Sharma Signed-off-by: Shailendra Verma --- fs/btrfs/ioctl.c | 21 ++--- 1 file changed, 6 insertions

[PATCH] Fs: Btrfs - Improvement in code readability when

2016-11-10 Thread Shailendra Verma
From: "Shailendra Verma" There is no need to call kfree() if memdup_user() fails, as no memory was allocated and the error in the error-valued pointer should be returned. Signed-off-by: Shailendra Verma --- fs/btrfs/ioctl.c | 21 ++--- 1 file changed, 6 inserti