ntb: transport: Fix uninitialized mutex
When the mutex 'link_event_lock' was introduced, it was never
initialized and it triggers kernel warnings when used with locking
debug turned on. Add initialization for the mutex.
Fixes: 3db835dd8f ("ntb: Add mutex to make link_event_callback executed linearly.")
Cc: fuyuanli <fuyuanli0722@gmail.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
master
parent
8f0b4cce44
commit
2ccb5e8dbc
|
|
@ -1394,6 +1394,7 @@ static int ntb_transport_probe(struct ntb_client *self, struct ntb_dev *ndev)
|
|||
goto err2;
|
||||
}
|
||||
|
||||
mutex_init(&nt->link_event_lock);
|
||||
INIT_DELAYED_WORK(&nt->link_work, ntb_transport_link_work);
|
||||
INIT_WORK(&nt->link_cleanup, ntb_transport_link_cleanup_work);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue