[firefly] [PATCH] staging: comedi: use memdup_user to simplify kmalloc+copy_from_user

Daniel Baluta daniel.baluta at gmail.com
Fri Oct 25 12:24:13 EEST 2013


On Fri, Oct 25, 2013 at 12:05 PM, Teodora Baluta <teobaluta at gmail.com> wrote:
> Use memdup_user rather than duplicating implementation. Fix following
> coccinelle warnings:
>
> drivers/staging/comedi/comedi_fops.c:1425:5-12: WARNING opportunity for memdup_user
> drivers/staging/comedi/comedi_fops.c:1553:6-13: WARNING opportunity for memdup_user
>
> Signed-off-by: Teodora Baluta <teobaluta at gmail.com>

Looks good. A strerror like function would have been useful here, but
send it to opw-kernel.

thanks,
Daniel.


More information about the firefly mailing list