diff options
| author | Geert Uytterhoeven <[email protected]> | 2018-02-07 09:12:04 +0000 |
|---|---|---|
| committer | Darren Hart (VMware) <[email protected]> | 2018-02-09 01:43:37 +0000 |
| commit | b81e830c9ad041aba81b495d9386dc31aed3f1e6 (patch) | |
| tree | 3ff5c94d1d2b283f87fcbfb83ffa545464c96472 /drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | |
| parent | platform/x86: samsung-laptop: Re-use DEFINE_SHOW_ATTRIBUTE() macro (diff) | |
| download | kernel-b81e830c9ad041aba81b495d9386dc31aed3f1e6.tar.gz kernel-b81e830c9ad041aba81b495d9386dc31aed3f1e6.zip | |
platform/mellanox: mlxreg-hotplug: Fix uninitialized variable
With gcc-4.1.2:
drivers/platform/mellanox/mlxreg-hotplug.c: In function ‘mlxreg_hotplug_health_work_helper’:
drivers/platform/mellanox/mlxreg-hotplug.c:347: warning: ‘ret’ is used uninitialized in this function
Indeed, if mlxreg_core_item.count is zero, ret is used uninitialized.
While this is unlikely to happen (it is set to ARRAY_SIZE(...) in x86
board files), this is done in another source file, so fix this by
preinitializing ret to zero.
Fixes: c6acad68eb2dbffd ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Signed-off-by: Geert Uytterhoeven <[email protected]>
Acked-by: Vadim Pasternak <[email protected]>
Signed-off-by: Darren Hart (VMware) <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c')
0 files changed, 0 insertions, 0 deletions
