[PATCH] ipc: Using unlikely macro is more efficient.

From: mohammed0x00
Date: Sun Sep 17 2023 - 13:32:38 EST


Signed-off-by: Mohammed Mansour <mmansour.mm5@xxxxxxxxx>
---
ipc/shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipc/shm.c b/ipc/shm.c
index 576a543b7..8ce67ae16 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -734,7 +734,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)

shp->shm_perm.security = NULL;
error = security_shm_alloc(&shp->shm_perm);
- if (error) {
+ if (unlikely(error)) {
kfree(shp);
return error;
}
--
2.34.1