diff mbox series

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

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

Checks

Context Check Description
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix warning Target tree name not specified in the subject
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 7 maintainers not CCed: agross@kernel.org loic.poulain@linaro.org bjorn.andersson@linaro.org ryazanov.s.a@gmail.com kuba@kernel.org pabeni@redhat.com johannes@sipsolutions.net
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/tree_selection success Guessing tree name failed - patch did not apply

Commit Message

Yang Yingliang March 19, 2022, 3:24 a.m. UTC
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(-)

Comments

Stephan Gerhold March 19, 2022, 11:38 a.m. UTC | #1
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
>
patchwork-bot+netdevbpf@kernel.org March 22, 2022, 8:50 a.m. UTC | #2
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 mbox series

Patch

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);