aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2013-08-21 07:47:03 -0400
committerFelipe Balbi <balbi@ti.com>2013-08-27 16:05:39 -0400
commit0f2aa8caeaa043f6cbe6281eb72efba5ff860904 (patch)
treee4168d0fa3373bb94899c04ec751ca7a9d4ae409 /drivers/usb
parentffb62a14c7b6109ca4ee9bb360ad867b294acddc (diff)
usb: musb: ux500: Add check for NULL board data
Dan Carpenter's automatic Smatch checker found an anomaly in the ux500 MUSB driver, whereby board data was checked before use in all but one occasion. It is believed that it needs to be checked every time. Smatch complaint: drivers/usb/musb/ux500_dma.c:335 ux500_dma_controller_start() error: we previously assumed 'data' could be null (see line 313) Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Cc: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/ux500_dma.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index e51dd9b88e71..3700e9713258 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -333,7 +333,9 @@ static int ux500_dma_controller_start(struct ux500_dma_controller *controller)
333 if (!ux500_channel->dma_chan) 333 if (!ux500_channel->dma_chan)
334 ux500_channel->dma_chan = 334 ux500_channel->dma_chan =
335 dma_request_channel(mask, 335 dma_request_channel(mask,
336 data->dma_filter, 336 data ?
337 data->dma_filter :
338 NULL,
337 param_array[ch_num]); 339 param_array[ch_num]);
338 340
339 if (!ux500_channel->dma_chan) { 341 if (!ux500_channel->dma_chan) {