瀏覽代碼

Staging: dwc2: Fix return error value in dwc2_driver_probe()

This patch fixes the following smatch warning in platform.c-
drivers/staging/dwc2/platform.c:109 dwc2_driver_probe() info: why not propagate 'irq' from platform_get_irq() instead of (-22)?

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Rashika Kheria 12 年之前
父節點
當前提交
097f261217
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/staging/dwc2/platform.c

+ 1 - 1
drivers/staging/dwc2/platform.c

@@ -106,7 +106,7 @@ static int dwc2_driver_probe(struct platform_device *dev)
 	irq = platform_get_irq(dev, 0);
 	if (irq < 0) {
 		dev_err(&dev->dev, "missing IRQ resource\n");
-		return -EINVAL;
+		return irq;
 	}
 
 	res = platform_get_resource(dev, IORESOURCE_MEM, 0);