Staging: media: imx: imx6-mipi-csi2.c Remove unnecessary error messages
PATCH v2 1/1 Staging: media: imx: imx6-mipi-csi2.c Remove unnecessary error messages
The function devm_ioremap already prints error message when there is no enough memory.
Remove print statements that give error messages
Issue found using coccinelle
The following semantic patch is used to solve this:
<smpl>
@@
expression x;
constant char[] C;
identifier f;
@@
x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
if(x==NULL)
{
...
(
-f(C,...);
|
-f(...,C);
)
...
}
</smpl>
---
v2:
-subject line modified
-commit log modified
drivers/staging/media/imx/imx6-mipi-csi2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/media/imx/imx6-mipi-csi2.c +1 -3
@@ -628,10 +628,8 @@ static int csi2_probe(struct platform_device *pdev) } csi2->base =devm_ioremap (&pdev->dev, res->start,PAGE_SIZE ); -if (!csi2->base) { -v4l2_err (&csi2->sd,"failed to map CSI-2 registers\n" ); +if (!csi2->base)return -ENOMEM ; - }mutex_init (&csi2->lock);
Signature · 1 line
2.17.1
It's not normal to put the file name in the subject line. There aren't many examples on this file, but maybe:
media: imx: mipi csi-2:
julia
Quoted 63 lines · Bhanusree Pola
The function
devm_ioremapalready prints error message when there is no enough memory.
Remove print statements that give error messages
Issue found using coccinelle
The following semantic patch is used to solve this:<smpl>
@@
expression x;
constant char[] C;
identifier f;
@@x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
if(x==NULL)
{
...
(
-f(C,...);
|
-f(...,C);
)
...
}
</smpl>Signed-off-by Bhanusree Pola <[email protected]>---
v2:
-subject line modified
-commit log modifieddrivers/staging/media/imx/imx6-mipi-csi2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/staging/media/imx/imx6-mipi-csi2.c +1
-4@@ -628,10 +628,8 @@ static int csi2_probe(struct platform_device *pdev) } csi2->base =devm_ioremap (&pdev->dev, res->start,PAGE_SIZE ); -if (!csi2->base) { -v4l2_err (&csi2->sd,"failed to map CSI-2 registers\n" ); +if (!csi2->base)return -ENOMEM ; - }mutex_init (&csi2->lock); --2.17.1
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20190322154035.9014-1-bhanusreemahesh%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
Quoted 29 lines · Bhanusree Pola
The function
devm_ioremapalready prints error message when there is no enough memory.
Remove print statements that give error messages
Issue found using coccinelle
The following semantic patch is used to solve this:<smpl>
@@
expression x;
constant char[] C;
identifier f;
@@x = (\(kmalloc\|devm_kzalloc\|kmalloc_array\|devm_ioremap\| usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\)(...));
if(x==NULL)
{
...
(
-f(C,...);
|
-f(...,C);
)
...
}
</smpl>
Quoted 1 line
Signed-off-by Bhanusree Pola <[email protected]>