diff --git a/ipc/shm.c b/ipc/shm.c index 4cd402e4cfeb603e2417a3796c3d9b22f3022f89..1c65fb357395eace45f25a7c6a37d91ebe30a722 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -206,7 +206,7 @@ static inline struct shmid_kernel *shm_lock(struct ipc_namespace *ns, int id) * Callers of shm_lock() must validate the status of the returned ipc * object pointer and error out as appropriate. */ - return (void *)ipcp; + return ERR_CAST(ipcp); } static inline void shm_lock_by_ptr(struct shmid_kernel *ipcp)