Message ID | 20220319032450.3288224-1-yangyingliang@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6b3c74550224c3be24c4cf6ab8c333602b458bff |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [-next] net: wwan: qcom_bam_dmux: fix wrong pointer passed to IS_ERR() | expand |
On Sat, Mar 19, 2022 at 11:24:50AM +0800, Yang Yingliang wrote: > It should check dmux->tx after calling dma_request_chan(). > > Fixes: 21a0ffd9b38c ("net: wwan: Add Qualcomm BAM-DMUX WWAN network driver") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Good catch, thanks! Reviewed-by: Stephan Gerhold <stephan@gerhold.net> I'm a bit confused by the -next suffix in the subject though, this should probably go into "net" (not "net-next") since it is a fix. > --- > drivers/net/wwan/qcom_bam_dmux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c > index 5dfa2eba6014..17d46f4d2913 100644 > --- a/drivers/net/wwan/qcom_bam_dmux.c > +++ b/drivers/net/wwan/qcom_bam_dmux.c > @@ -755,7 +755,7 @@ static int __maybe_unused bam_dmux_runtime_resume(struct device *dev) > return 0; > > dmux->tx = dma_request_chan(dev, "tx"); > - if (IS_ERR(dmux->rx)) { > + if (IS_ERR(dmux->tx)) { > dev_err(dev, "Failed to request TX DMA channel: %pe\n", dmux->tx); > dmux->tx = NULL; > bam_dmux_runtime_suspend(dev); > -- > 2.25.1 >
Hello: This patch was applied to netdev/net.git (master) by Paolo Abeni <pabeni@redhat.com>: On Sat, 19 Mar 2022 11:24:50 +0800 you wrote: > It should check dmux->tx after calling dma_request_chan(). > > Fixes: 21a0ffd9b38c ("net: wwan: Add Qualcomm BAM-DMUX WWAN network driver") > Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> > --- > drivers/net/wwan/qcom_bam_dmux.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Here is the summary with links: - [-next] net: wwan: qcom_bam_dmux: fix wrong pointer passed to IS_ERR() https://git.kernel.org/netdev/net/c/6b3c74550224 You are awesome, thank you!
diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c index 5dfa2eba6014..17d46f4d2913 100644 --- a/drivers/net/wwan/qcom_bam_dmux.c +++ b/drivers/net/wwan/qcom_bam_dmux.c @@ -755,7 +755,7 @@ static int __maybe_unused bam_dmux_runtime_resume(struct device *dev) return 0; dmux->tx = dma_request_chan(dev, "tx"); - if (IS_ERR(dmux->rx)) { + if (IS_ERR(dmux->tx)) { dev_err(dev, "Failed to request TX DMA channel: %pe\n", dmux->tx); dmux->tx = NULL; bam_dmux_runtime_suspend(dev);
It should check dmux->tx after calling dma_request_chan(). Fixes: 21a0ffd9b38c ("net: wwan: Add Qualcomm BAM-DMUX WWAN network driver") Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> --- drivers/net/wwan/qcom_bam_dmux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)