]> git.baikalelectronics.ru Git - kernel.git/commit
usb: musb: omap2430: fix wrong devm_kzalloc() result check
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Tue, 8 Jan 2013 19:11:14 +0000 (22:11 +0300)
committerFelipe Balbi <balbi@ti.com>
Thu, 17 Jan 2013 13:45:45 +0000 (15:45 +0200)
commit8f84b9db050a4bdefb837bd0130c48fd71d8ddd2
tree195e5c175921562c353107d93ece3fb7ce042f56
parent9ba0daf4a5ae75ab1aa48a654529bed2e06c8610
usb: musb: omap2430: fix wrong devm_kzalloc() result check

Commit 8c7bbc088bf3f308f2147bf0d93f70e160123cbb (usb: musb: omap: Add device
tree support for omap musb glue) assigns result of devm_kzalloc() call to
the 'config' variable but then checks for NULL the 'data' variable (already
checked after previous call). Thus we risk a kernel oops further when data
pointed by 'config' is written to by subsequent of_property_read_u32() calls
iff the allocation happens to fail...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/omap2430.c