MGS-3846 [#imx-1015] fix coverity high impact issue
authorYuchou Gan <yuchou.gan@nxp.com>
Thu, 26 Apr 2018 10:52:58 +0000 (18:52 +0800)
committerYuchou Gan <yuchou.gan@nxp.com>
Thu, 26 Apr 2018 10:55:40 +0000 (18:55 +0800)
Using uninitialized value minf when calling snprintf.
Initilize it to fix.

Date: 25th Apr, 2018
Signed-off-by: Yuchou Gan<yuchou.gan@nxp.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c

index 5e75c6c..cad3e87 100644 (file)
@@ -324,6 +324,7 @@ static ssize_t show_gpu3DMinClock(struct device_driver *dev, char *buf)
 
     galDevice = platform_get_drvdata(pdevice);
 
+    minf = 0;
     if (galDevice->kernels[gcvCORE_MAJOR])
     {
          gckHARDWARE_GetFscaleValue(galDevice->kernels[gcvCORE_MAJOR]->hardware,