qcacld-3.0: Initialize out_mode in hdd_parse_driver_mode

gcc-4.8 incorrectly flags the use of @next_mode in __con_mode_handler as
potentially uninitialized, while newer versions do not seem to have a
problem. Work around the compiler quirk by initializing @out_mode in
hdd_parse_driver_mode.

Change-Id: Iee101db6eaded8e856e461458d6a80e8279e9ca1
CRs-Fixed: 2338538
This commit is contained in:
Dustin Brown 2018-10-24 14:53:18 -07:00 • committed by nshrivas
commit 62743f4c71

View file

@ -13242,6 +13242,8 @@ hdd_parse_driver_mode(const char *mode_str, enum QDF_GLOBAL_MODE *out_mode)
int mode;
int errno;
*out_mode = QDF_GLOBAL_MAX_MODE;
errno = kstrtoint(mode_str, 0, &mode);
if (!errno)
*out_mode = (enum QDF_GLOBAL_MODE)mode;