提交 0f2aa8ca 编写于 作者: L Lee Jones 提交者: Felipe Balbi

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: NLee Jones <lee.jones@linaro.org>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 ffb62a14
......@@ -333,7 +333,9 @@ static int ux500_dma_controller_start(struct ux500_dma_controller *controller)
if (!ux500_channel->dma_chan)
ux500_channel->dma_chan =
dma_request_channel(mask,
data->dma_filter,
data ?
data->dma_filter :
NULL,
param_array[ch_num]);
if (!ux500_channel->dma_chan) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册