upstream: [media] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 14 Aug 2013 08:11:15 +0000 (05:11 -0300)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 05:26:51 +0000 (14:26 +0900)
commitda2604144877b02b34d85a2f3e483bd907e60e16
tree4c563981a58b5d6b3b7f3b9331ef9db20236b6df
parent51402ebf25e2afd62ad2365a6fa85b6ad36f32e9
upstream: [media] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource

Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  ... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
  ... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
  e = devm_ioremap_resource(e1, res);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/marvell-ccic/mmp-driver.c