mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
Staging: media: imx: mipi-csi2: 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>
Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ab2a7a292a
commit
1ec119f094
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user