summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2020-06-04 00:49:19 +0300
committerMichael Bestas <mkbestas@lineageos.org>2020-06-04 00:49:19 +0300
commit08e780103611fb2be36c17ff80de6cb54c910dd0 (patch)
tree8bd63552a71f699da64faee819fc9c56501be6f2 /ipc
parent978414b66805b23c93560db9cdacd4fd83f8cc52 (diff)
parent60fca757270659c627384fcfe7219d2b85f1459c (diff)
Merge branch 'android-4.4-p' of https://android.googlesource.com/kernel/common into lineage-17.1-caf-msm8998
This brings LA.UM.8.4.r1-05500-8x98.0 up to date with https://android.googlesource.com/kernel/common/ android-4.4-p at commit: 60fca75727065 Merge 4.4.226 into android-4.4-p Conflicts: drivers/base/firmware_class.c drivers/gpu/drm/msm/msm_gem.c drivers/mmc/host/sdhci.c drivers/net/wireless/ath/ath10k/core.c kernel/trace/blktrace.c net/socket.c sound/core/rawmidi.c sound/usb/mixer.c Change-Id: Ic8599e865656da72a9405c45f27091ec1ddc168c
Diffstat (limited to 'ipc')
-rw-r--r--ipc/util.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ipc/util.c b/ipc/util.c
index 2724f9071ab3..7af476b6dcdd 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -756,21 +756,21 @@ static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos,
total++;
}
- *new_pos = pos + 1;
+ ipc = NULL;
if (total >= ids->in_use)
- return NULL;
+ goto out;
for (; pos < IPCMNI; pos++) {
ipc = idr_find(&ids->ipcs_idr, pos);
if (ipc != NULL) {
rcu_read_lock();
ipc_lock_object(ipc);
- return ipc;
+ break;
}
}
-
- /* Out of range - return NULL to terminate iteration */
- return NULL;
+out:
+ *new_pos = pos + 1;
+ return ipc;
}
static void *sysvipc_proc_next(struct seq_file *s, void *it, loff_t *pos)