ib_dereg_mr(mad_agent_priv->agent.mr); 
static void unregister_mad_agent(struct ib_mad_agent_private *mad_agent_priv){	struct ib_mad_port_private *port_priv;	unsigned long flags;	/* Note that we could still be handling received MADs */	/*	 * Canceling all sends results in dropping received response	 * MADs, preventing us from queuing additional work	 */	cancel_mads(mad_agent_priv);	port_priv = mad_agent_priv->qp_info->port_priv;	cancel_delayed_work(&mad_agent_priv->timed_work);	flush_workqueue(port_priv->wq);	spin_lock_irqsave(&port_priv->reg_lock, flags);	remove_mad_reg_req(mad_agent_priv);	list_del(&mad_agent_priv->agent_list);	spin_unlock_irqrestore(&port_priv->reg_lock, flags);	/* XXX: Cleanup pending RMPP receives for this agent */	atomic_dec(&mad_agent_priv->refcount);	wait_event(mad_agent_priv->wait,		   !atomic_read(&mad_agent_priv->refcount));	if (mad_agent_priv->reg_req)		kfree(mad_agent_priv->reg_req);	kfree(mad_agent_priv);}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/b82cab6b331b51d82f90d2207f3bbfdf09361ac9/mad.c/clean/drivers/infiniband/core/mad.c