usb: musb: ux500: harden checks for platform data
authorLee Jones <lee.jones@linaro.org>
Wed, 15 May 2013 09:51:46 +0000 (10:51 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Jun 2013 09:12:04 +0000 (11:12 +0200)
commit5f6091a023ca435c49467348e388fa89e635436a
tree596851ba8fbaba03f509247abfa12fa49fbd5057
parent1e6eebb4e907548d53347a6e90769feb3d73e9da
usb: musb: ux500: harden checks for platform data

In its current state, the ux500-musb driver uses platform data pointers
blindly with no prior checking. If no platform data pointer is passed
this will Oops the kernel. In this patch we ensure platform data and
board data are present prior to using them.

Cc: linux-usb@vger.kernel.org
Acked-by: Felipe Balbi <balbi@ti.com>
Acked-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/usb/musb/ux500_dma.c