diff options
Diffstat (limited to 'arch/arm/plat-omap/mailbox.c')
| -rw-r--r-- | arch/arm/plat-omap/mailbox.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 459b319a9fad..49d3208793e5 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
| @@ -322,15 +322,18 @@ static void omap_mbox_fini(struct omap_mbox *mbox) | |||
| 322 | 322 | ||
| 323 | struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) | 323 | struct omap_mbox *omap_mbox_get(const char *name, struct notifier_block *nb) |
| 324 | { | 324 | { |
| 325 | struct omap_mbox *mbox; | 325 | struct omap_mbox *_mbox, *mbox = NULL; |
| 326 | int ret; | 326 | int i, ret; |
| 327 | 327 | ||
| 328 | if (!mboxes) | 328 | if (!mboxes) |
| 329 | return ERR_PTR(-EINVAL); | 329 | return ERR_PTR(-EINVAL); |
| 330 | 330 | ||
| 331 | for (mbox = *mboxes; mbox; mbox++) | 331 | for (i = 0; (_mbox = mboxes[i]); i++) { |
| 332 | if (!strcmp(mbox->name, name)) | 332 | if (!strcmp(_mbox->name, name)) { |
| 333 | mbox = _mbox; | ||
| 333 | break; | 334 | break; |
| 335 | } | ||
| 336 | } | ||
| 334 | 337 | ||
| 335 | if (!mbox) | 338 | if (!mbox) |
| 336 | return ERR_PTR(-ENOENT); | 339 | return ERR_PTR(-ENOENT); |
