Dan Carpenter
2023-Nov-07 15:18 UTC
[Nouveau] [PATCH] nouveau/gsp/r535: uninitialized variable in r535_gsp_acpi_mux_id()
The if we hit the "continue" statement on the first iteration through the loop then "handle_mux" needs to be set to NULL so we continue looping. Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org> --- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c index e31f9641114b..afa8e7377a76 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c @@ -1159,7 +1159,7 @@ static void r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode, MUX_METHOD_DATA_ELEMENT *part) { - acpi_handle iter = NULL, handle_mux; + acpi_handle iter = NULL, handle_mux = NULL; acpi_status status; unsigned long long value; -- 2.42.0
Danilo Krummrich
2023-Nov-07 16:35 UTC
[Nouveau] [PATCH] nouveau/gsp/r535: uninitialized variable in r535_gsp_acpi_mux_id()
On 11/7/23 16:18, Dan Carpenter wrote:> The if we hit the "continue" statement on the first iteration through > the loop then "handle_mux" needs to be set to NULL so we continue > looping. > > Fixes: 176fdcbddfd2 ("drm/nouveau/gsp/r535: add support for booting GSP-RM") > Signed-off-by: Dan Carpenter <dan.carpenter at linaro.org>Good catch! Reviewed-by: Danilo Krummrich <dakr at redhat.com> @Dave: Can't pick this patch up myself, since this should probably go into drm/topic/nvidia-gsp.> --- > drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > index e31f9641114b..afa8e7377a76 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c > @@ -1159,7 +1159,7 @@ static void > r535_gsp_acpi_mux_id(acpi_handle handle, u32 id, MUX_METHOD_DATA_ELEMENT *mode, > MUX_METHOD_DATA_ELEMENT *part) > { > - acpi_handle iter = NULL, handle_mux; > + acpi_handle iter = NULL, handle_mux = NULL; > acpi_status status; > unsigned long long value; >