xref: /linux/rust/helpers/err.c (revision ab0e7f20768af59fe161d71cc5d1de384f2a9da8)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/err.h>
4 
5 __force void *rust_helper_ERR_PTR(long err)
6 {
7 	return ERR_PTR(err);
8 }
9 
10 bool rust_helper_IS_ERR(__force const void *ptr)
11 {
12 	return IS_ERR(ptr);
13 }
14 
15 long rust_helper_PTR_ERR(__force const void *ptr)
16 {
17 	return PTR_ERR(ptr);
18 }
19