diff --git a/net/neuron/channel/ch_haven_recv.c b/net/neuron/channel/ch_haven_recv.c index 1422491b9bde..2359343fa009 100644 --- a/net/neuron/channel/ch_haven_recv.c +++ b/net/neuron/channel/ch_haven_recv.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2020 The Linux Foundation. All rights reserved. */ +/* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. */ #include #include @@ -479,6 +479,7 @@ static int channel_hh_probe(struct neuron_channel *cdev) if (!priv) return -ENOMEM; priv->dev = cdev; + init_waitqueue_head(&priv->wait_q); ret = of_property_read_u32(node, "haven-label", &priv->haven_label); if (ret) { @@ -507,8 +508,6 @@ static int channel_hh_probe(struct neuron_channel *cdev) dev_err(dev, "failed to get haven rx dbl %d\n", ret); goto fail_rx_dbl; } - - init_waitqueue_head(&priv->wait_q); /* Start the thread for syncing with the sender. */ priv->sync_thread = kthread_run(channel_sync_thread, priv, "recv_sync_thread"); diff --git a/net/neuron/channel/ch_haven_send.c b/net/neuron/channel/ch_haven_send.c index 37ab21e15495..d0bd569b789b 100644 --- a/net/neuron/channel/ch_haven_send.c +++ b/net/neuron/channel/ch_haven_send.c @@ -1,5 +1,5 @@ // SPDX-License-Identifier: GPL-2.0-only -/* Copyright (c) 2020 The Linux Foundation. All rights reserved. */ +/* Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. */ #include #include @@ -464,6 +464,7 @@ static int channel_hh_probe(struct neuron_channel *cdev) if (!priv) return -ENOMEM; priv->dev = cdev; + init_waitqueue_head(&priv->wait_q); ret = of_property_read_u32(node, "haven-label", &priv->haven_label); if (ret) { @@ -490,8 +491,6 @@ static int channel_hh_probe(struct neuron_channel *cdev) dev_err(dev, "failed to get haven rx dbl %d\n", ret); goto fail_rx_dbl; } - - init_waitqueue_head(&priv->wait_q); /* Start the thread for syncing with the receiver. */ priv->sync_thread = kthread_run(channel_sync_thread, priv, "send_sync_thread");