hooks: add a warning to detect unimplemented hooks
[smatch.git] / validation / sm_efault.c
blobe3d52adb5583b86af4b40c5ef0dc114ac24853a3
1 #include "check_debug.h"
3 int clear_user();
5 int func(int *p)
7 int ret;
9 ret = clear_user();
10 if (ret)
11 return ret;
12 return 0;
15 * check-name: smatch return -EFAULT
16 * check-command: smatch -p=kernel -I.. sm_efault.c
18 * check-output-start
19 sm_efault.c:11 func() warn: maybe return -EFAULT instead of the bytes remaining?
20 * check-output-end