浏览代码

usb: musb: dsps: fix error return code in dsps_create_musb_pdev()

Fix to return -ENOMEM in the devm_kzalloc() error handling
case instead of 0, as done elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Wei Yongjun 12 年之前
父节点
当前提交
b25e5f1c44
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/usb/musb/musb_dsps.c

+ 1 - 0
drivers/usb/musb/musb_dsps.c

@@ -560,6 +560,7 @@ static int dsps_create_musb_pdev(struct dsps_glue *glue, u8 id)
 		if (!config) {
 			dev_err(&pdev->dev,
 				"failed to allocate musb hdrc config\n");
+			ret = -ENOMEM;
 			goto err2;
 		}