Messages in this thread |  | | Date | Fri, 25 Aug 2000 23:04:05 +0100 (BST) | From | Tigran Aivazian <> | Subject | Re: [PATCH] serial167.c: bugfixes and cleanups |
| |
Hi Arnaldo,
On Fri, 25 Aug 2000, Arnaldo Carvalho de Melo wrote: > - copy_to_user(retinfo,&tmp,sizeof(*retinfo)); > + if (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) > + return -EFAULT; > return 0;
I think Linus already suggested that you do this:
return copy_to_user(...) ? -EFAULT : 0;
it is compact and intuitive.
Regards, Tigran
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |