소스 검색

usb: chipidea: ci13xxx_imx: check if 'data->phy_np' is not NULL

Similarly as it is done in ci13xxx_imx_remove(), only calls of_node_put if
data->phy_np is not NULL.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fabio Estevam 12 년 전
부모
커밋
785dabef0c
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      drivers/usb/chipidea/ci13xxx_imx.c

+ 2 - 1
drivers/usb/chipidea/ci13xxx_imx.c

@@ -232,7 +232,8 @@ static int ci13xxx_imx_remove(struct platform_device *pdev)
 		module_put(data->phy->dev->driver->owner);
 	}
 
-	of_node_put(data->phy_np);
+	if (data->phy_np)
+		of_node_put(data->phy_np);
 
 	clk_disable_unprepare(data->clk);