Message ID | m3wrp4jmxk.fsf@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/net/9p/client.c b/net/9p/client.c index e141e46..dbca5b3 100644 --- a/net/9p/client.c +++ b/net/9p/client.c @@ -1333,16 +1333,13 @@ p9_client_read(struct p9_fid *fid, char *data, char __user *udata, u64 offset, if (data) { memmove(data, dataptr, count); - } - - if (udata) { + } else { err = copy_to_user(udata, dataptr, count); if (err) { err = -EFAULT; goto free_and_error; } } - p9_free_req(clnt, req); return count;