diff --git a/[refs] b/[refs] index 7420c97487f2..49db3d52246f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 62aa528e0299ffef8e138d9d92d13e631d06c5ff +refs/heads/master: 16ec4700127d479143c77fd9128dfa17ab572963 diff --git a/trunk/net/9p/conv.c b/trunk/net/9p/conv.c index 44547201f5bc..5ad3a3bd73b2 100644 --- a/trunk/net/9p/conv.c +++ b/trunk/net/9p/conv.c @@ -451,8 +451,10 @@ p9_put_data(struct cbuf *bufp, const char *data, int count, unsigned char **pdata) { *pdata = buf_alloc(bufp, count); + if (*pdata == NULL) + return -ENOMEM; memmove(*pdata, data, count); - return count; + return 0; } static int @@ -460,6 +462,8 @@ p9_put_user_data(struct cbuf *bufp, const char __user *data, int count, unsigned char **pdata) { *pdata = buf_alloc(bufp, count); + if (*pdata == NULL) + return -ENOMEM; return copy_from_user(*pdata, data, count); }