[PATCH] staging/media/solo6x10/v4l2-enc.c: fix error-handling.

2012-11-16 Thread Cyril Roelandt
The return values of copy_to_user() and copy_from_user() cannot be negative. Found using the following semantich patch: @exists@ identifier ret; statement S; expression E; @@ ( * ret = copy_to_user(...); | * ret = copy_from_user(...); ) ... when != ret = E when != if (ret) { <+... ret = E;

[PATCH] staging/media/solo6x10/v4l2-enc.c: fix error-handling.

2012-11-16 Thread Cyril Roelandt
The return values of copy_to_user() and copy_from_user() cannot be negative. Found using the following semantich patch: spml @exists@ identifier ret; statement S; expression E; @@ ( * ret = copy_to_user(...); | * ret = copy_from_user(...); ) ... when != ret = E when != if (ret) { +... ret =