Skip to contentSkip to conversation

Mailbox: Check valid registered callback before calling

PATCH Superseded Guzman Lugo, Fernando 1 participant 1 message Feb 13, 2010

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 4/6 Mailbox: Check valid registered callback before calling

Quoted 1 line

From 6b31bcca42598217bd46dd5719c50d37fa9ffc3a Mon Sep 17 00:00:00 2001

From: Fernando Guzman Lugo <[email protected]>
Date: Wed, 27 Jan 2010 20:04:02 -0600
Subject: [PATCH] Mailbox: Check valid registered callback before calling

This patch checks if the mailbox user has assinged a valid callback fuction before calling it.

---
 arch/arm/plat-omap/mailbox.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/plat-omap/mailbox.c +2 -1
index 3e2f961..8136ee3 100644
@@ -144,7 +144,8 @@ static void mbox_rx_work(struct work_struct *work)
 
 		msg = (mbox_msg_t)rq->special;
 		blk_end_request_all(rq, 0);
-		mbox->rxq->callback((void *)msg);
+		if (mbox->rxq->callback)
+			mbox->rxq->callback((void *)msg);
 	}
 }
 
Signature · 1 line
1.6.0.4