]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: dsps: fix devm_ioremap_resource error detection code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Mon, 19 Aug 2013 16:00:08 +0000 (18:00 +0200)
committerFelipe Balbi <balbi@ti.com>
Tue, 27 Aug 2013 19:17:03 +0000 (14:17 -0500)
commit652f501e71b82688434b960037146388c7590101
tree31da411ab585eadc5dcff11996d28d2eb9157457
parentf5a1f034d615a6da00a886893548c6b1774691be
usb: musb: dsps: fix devm_ioremap_resource error detection code

devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure.
Furthermore, the value returned by devm_ioremap_resource should be tested.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1;
statement S;
@@

*e = devm_ioremap_resource(...);
if (!e1) S

// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/musb_dsps.c