misc/fastrpc: add checked value for dma_set_mask
Subsystems (2)
PATCH 1/1 misc/fastrpc: add checked value for dma_set_mask
There be should check return value from dma_set_mask to throw some infos if fail to set dma mask.
Detected by CoverityScan, CID# 1443983: Error handling issues (CHECKED_RETURN)
--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/misc/fastrpc.c +6 -1
@@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)struct fastrpc_session_ctx *sess;struct device *dev = &pdev->dev;int i, sessions =0 ; +int rc; cctx =dev_get_drvdata (dev->parent);if (!cctx)
@@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev) } cctx->sesscount++;spin_unlock (&cctx->lock); -dma_set_mask (dev,DMA_BIT_MASK (32 )); + rc =dma_set_mask (dev,DMA_BIT_MASK (32 )); +if (rc) { +dev_err (dev,"32-bit DMA enable failed\n" ); +return rc; + }return 0 ; }
Signature · 1 line
2.11.0
Quoted 25 lines · Bo YU
There be should check return value from
dma_set_maskto throw some infos if fail to set dma mask.Detected by CoverityScan, CID# 1443983: Error handling issues (
CHECKED_RETURN)Fixes f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)Signed-off-by Bo YU <[email protected]>--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/misc/fastrpc.c +1
-0@@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)struct fastrpc_session_ctx *sess;struct device *dev = &pdev->dev;int i, sessions =0 ; +int rc; cctx =dev_get_drvdata (dev->parent);if (!cctx)
drivers/misc/fastrpc.c static int fastrpc_cb_probe(struct platform_device *pdev) · line 1222
Quoted 10 lines
drivers/misc/fastrpc.c +5
-1@@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev) } cctx->sesscount++;spin_unlock (&cctx->lock); -dma_set_mask (dev,DMA_BIT_MASK (32 )); + rc =dma_set_mask (dev,DMA_BIT_MASK (32 )); +if (rc) { +dev_err (dev,"32-bit DMA enable failed\n" ); +return rc; + }
Ping?
Do me need resend it?
Quoted 5 lines
drivers/misc/fastrpc.c +0
-1return 0 ; } --2.11.0
Kroah-Hartman
maintainerQuoted 23 lines · Bo YU
Quoted 22 lines · Bo YU
There be should check return value from
dma_set_maskto throw some infos if fail to set dma mask.Detected by CoverityScan, CID# 1443983: Error handling issues (
CHECKED_RETURN)Fixes f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)Signed-off-by Bo YU <[email protected]>--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/misc/fastrpc.c +1
-0@@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)struct fastrpc_session_ctx *sess;struct device *dev = &pdev->dev;int i, sessions =0 ; +int rc;
Quoted 15 lines
drivers/misc/fastrpc.c static int fastrpc_cb_probe(struct platform_device *pdev) · line 1222
Quoted 13 lines
drivers/misc/fastrpc.c +5
-1cctx =dev_get_drvdata (dev->parent);if (!cctx)@@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev) } cctx->sesscount++;spin_unlock (&cctx->lock); -dma_set_mask (dev,DMA_BIT_MASK (32 )); + rc =dma_set_mask (dev,DMA_BIT_MASK (32 )); +if (rc) { +dev_err (dev,"32-bit DMA enable failed\n" ); +return rc; + }Ping?
Do me need resend it?
2 days? Please give us time to catch up on patches, right after the merge window closed. This isn't a big deal, we have much higher priority patches to review. It will be gotten to eventually :)
thanks,
greg k-h
Quoted 41 lines · Kroah-Hartman
Quoted 23 lines · Bo YU
Quoted 22 lines · Bo YU
There be should check return value from
dma_set_maskto throw some infos if fail to set dma mask.Detected by CoverityScan, CID# 1443983: Error handling issues (
CHECKED_RETURN)Fixes f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)Signed-off-by Bo YU <[email protected]>--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/misc/fastrpc.c +1
-0@@ -1184,6 +1184,7 @@ static int fastrpc_cb_probe(struct platform_device *pdev)struct fastrpc_session_ctx *sess;struct device *dev = &pdev->dev;int i, sessions =0 ; +int rc;Quoted 15 lines
drivers/misc/fastrpc.c static int fastrpc_cb_probe(struct platform_device *pdev) · line 1222
Quoted 13 lines
drivers/misc/fastrpc.c +5
-1cctx =dev_get_drvdata (dev->parent);if (!cctx)@@ -1213,7 +1214,11 @@ static int fastrpc_cb_probe(struct platform_device *pdev) } cctx->sesscount++;spin_unlock (&cctx->lock); -dma_set_mask (dev,DMA_BIT_MASK (32 )); + rc =dma_set_mask (dev,DMA_BIT_MASK (32 )); +if (rc) { +dev_err (dev,"32-bit DMA enable failed\n" ); +return rc; + }Ping?
Do me need resend it?
Quoted 3 lines
2 days? Please give us time to catch up on patches, right after the merge window closed. This isn't a big deal, we have much higher priority patches to review. It will be gotten to eventually :)
Ok, thank you. I am not sure the trival patch is ok so disturb you :)
Quoted 4 lines
thanks,
greg k-h
Greg KH
maintainerQuoted 10 lines · Bo YU
There be should check return value from
dma_set_maskto throw some infos if fail to set dma mask.Detected by CoverityScan, CID# 1443983: Error handling issues (
CHECKED_RETURN)Fixes f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)Signed-off-by Bo YU <[email protected]>--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
This patch no longer applies to my tree due to other fastrpc fixes being sent before your patch :(
Please rebase and resend.
thanks,
greg k-h
Quoted 13 lines · Greg KH
Quoted 10 lines · Bo YU
There be should check return value from
dma_set_maskto throw some infos if fail to set dma mask.Detected by CoverityScan, CID# 1443983: Error handling issues (
CHECKED_RETURN)Fixes f6f9279f2bf0 (misc: fastrpc: Add Qualcomm fastrpc basic driver model)Signed-off-by Bo YU <[email protected]>--- drivers/misc/fastrpc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Quoted 4 lines
This patch no longer applies to my tree due to other fastrpc fixes being sent before your patch :(
Please rebase and resend.
Ok, will do.
Thank you.
Quoted 3 lines
thanks,
greg k-h