aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-09-07 02:59:15 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-08 01:02:20 -0400
commite89a3370b0aaf197016eceefa2e710517c83e445 (patch)
tree392759a6c064a07684f91462b6b891b3199ed120 /drivers/staging/tidspbridge
parent5da80ee8d863c32719e3431054e26a0ef1a02a51 (diff)
staging: tidspbridge: move the dereference below the NULL test
The dereference should be moved below the NULL test. spatch with a semantic match is used to found this. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/tidspbridge')
-rw-r--r--drivers/staging/tidspbridge/core/chnl_sm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/tidspbridge/core/chnl_sm.c b/drivers/staging/tidspbridge/core/chnl_sm.c
index f38950ea272..16fa3462fbb 100644
--- a/drivers/staging/tidspbridge/core/chnl_sm.c
+++ b/drivers/staging/tidspbridge/core/chnl_sm.c
@@ -94,7 +94,7 @@ int bridge_chnl_add_io_req(struct chnl_object *chnl_obj, void *host_buf,
94 struct dev_object *dev_obj; 94 struct dev_object *dev_obj;
95 u8 dw_state; 95 u8 dw_state;
96 bool is_eos; 96 bool is_eos;
97 struct chnl_mgr *chnl_mgr_obj = pchnl->chnl_mgr_obj; 97 struct chnl_mgr *chnl_mgr_obj;
98 u8 *host_sys_buf = NULL; 98 u8 *host_sys_buf = NULL;
99 bool sched_dpc = false; 99 bool sched_dpc = false;
100 u16 mb_val = 0; 100 u16 mb_val = 0;
@@ -153,6 +153,7 @@ func_cont:
153 * If DPC is scheduled in process context (iosm_schedule) and any 153 * If DPC is scheduled in process context (iosm_schedule) and any
154 * non-mailbox interrupt occurs, that DPC will run and break CS. Hence 154 * non-mailbox interrupt occurs, that DPC will run and break CS. Hence
155 * we disable ALL DPCs. We will try to disable ONLY IO DPC later. */ 155 * we disable ALL DPCs. We will try to disable ONLY IO DPC later. */
156 chnl_mgr_obj = pchnl->chnl_mgr_obj;
156 spin_lock_bh(&chnl_mgr_obj->chnl_mgr_lock); 157 spin_lock_bh(&chnl_mgr_obj->chnl_mgr_lock);
157 omap_mbox_disable_irq(dev_ctxt->mbox, IRQ_RX); 158 omap_mbox_disable_irq(dev_ctxt->mbox, IRQ_RX);
158 if (pchnl->chnl_type == CHNL_PCPY) { 159 if (pchnl->chnl_type == CHNL_PCPY) {