Fix to return a negative error code from the error handling case instead
of 0, as returned elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
 
        o2info_set_request_filled(&oiff->iff_req);
 
-       if (o2info_to_user(*oiff, req))
+       if (o2info_to_user(*oiff, req)) {
+               status = -EFAULT;
                goto bail;
+       }
 
        status = 0;
 bail: