lib/test_string.c: return -ENOMEM on memset16_selftest allocation failure
PATCH 1/1 lib/test_string.c: return -ENOMEM on memset16_selftest allocation failure
Clean up the following smatch warning:
lib/test_string.c:14 memset16_selftest() warn: returning -1 instead of -ENOMEM is sloppy.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Jiapeng Chong <[email protected]>
--- lib/test_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_string.c +1 -1
@@ -11,7 +11,7 @@ static __init int memset16_selftest(void) p =kmalloc (256 *2 *2 ,GFP_KERNEL );if (!p) -return -1 ; +return -ENOMEM ;for (i =0 ; i <256 ; i++) {for (j =0 ; j <256 ; j++) {
Signature · 1 line
2.20.1.7.g153144c
Quoted 4 lines · Jiapeng Chong
Clean up the following smatch warning:
lib/test_string.c:14memset16_selftest()warn: returning -1 instead of-ENOMEMis sloppy.
It's not that makes much difference, but fine
Reviewed-by Andy Shevchenko <[email protected]>
Quoted 22 lines
Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- lib/test_string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/test_string.c +1
-1@@ -11,7 +11,7 @@ static __init int memset16_selftest(void) p =kmalloc (256 *2 *2 ,GFP_KERNEL );if (!p) -return -1 ; +return -ENOMEM ;for (i =0 ; i <256 ; i++) {for (j =0 ; j <256 ; j++) {Signature · 1 line
2.20.1.7.g153144c
Signature · 2 lines
With Best Regards, Andy Shevchenko