1 #include "check_debug.h"
   2 
   3 int clear_user();
   4 
   5 int func(int *p)
   6 {
   7         int ret;
   8 
   9         ret = clear_user();
  10         if (ret)
  11                 return ret;
  12         return 0;
  13 }
  14 /*
  15  * check-name: smatch return -EFAULT
  16  * check-command: smatch -p=kernel -I.. sm_efault.c
  17  *
  18  * check-output-start
  19 sm_efault.c:11 func() warn: maybe return -EFAULT instead of the bytes remaining?
  20  * check-output-end
  21  */