--- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -337,14 +337,16 @@ static void omap_mbox_fini(struct omap_mbox *mbox) struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) { struct omap_mbox *mbox; - int ret; + int ret, i; if (!mboxes) return ERR_PTR(-EINVAL); - for (mbox = *mboxes; mbox; mbox++) + for (i = 0; mboxes[i]; i++) { + mbox = mboxes[i]; if (!strcmp(mbox->name, name)) break; + } if (!mbox) return ERR_PTR(-ENOENT);