Re: [PATCH 5/6] ASoC: samsung: tm2_wm5110: check of_parse return value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c
index 9300fef9bf26..da6204248f82 100644
--- a/sound/soc/samsung/tm2_wm5110.c
+++ b/sound/soc/samsung/tm2_wm5110.c
@@ -553,7 +553,7 @@ static int tm2_probe(struct platform_device *pdev)
ret = of_parse_phandle_with_args(dev->of_node, "i2s-controller",
  						 cells_name, i, &args);
-		if (!args.np) {
+		if (ret || !args.np) {

Only "if (ret)" because args.np won't be initialized on errors.

Thanks Krzysztof for the review, I will make that change in a v2.
But just to be clear, there's no need to test args.np then?



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux