Re: [PATCH -next] net: wwan: qcom_bam_dmux: fix wrong pointer passed to IS_ERR()

From: Stephan Gerhold
Date: Sat Mar 19 2022 - 07:41:34 EST


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@xxxxxxxxxx>

Good catch, thanks!

Reviewed-by: Stephan Gerhold <stephan@xxxxxxxxxxx>

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
>