ASoC: dapm: Fix pointer dereference in is_connected_output_ep()
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Thu, 14 Mar 2013 20:26:24 +0000 (21:26 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 15 Mar 2013 01:27:39 +0000 (01:27 +0000)
*path is not yet initialized when we check if the widget is connected.

The compiler also warns about this:
sound/soc/soc-dapm.c: In function 'is_connected_output_ep':
sound/soc/soc-dapm.c:824:18: warning: 'path' may be used uninitialized in this function

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-dapm.c

index f325551..ab621b1 100644 (file)
@@ -821,7 +821,6 @@ static int is_connected_output_ep(struct snd_soc_dapm_widget *widget,
                    (widget->id == snd_soc_dapm_line &&
                     !list_empty(&widget->sources))) {
                        widget->outputs = snd_soc_dapm_suspend_check(widget);
-                       path->walking = 0;
                        return widget->outputs;
                }
        }