OSDN Git Service

staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 21 Feb 2019 05:25:24 +0000 (22:25 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2020 13:50:26 +0000 (14:50 +0100)
commitcef6cba5c596eb70fe41848b93a0225a0c3a049b
tree0dbb72e4595f7b1717c911a3a37e1b389b3a96c0
parenteb07716493d72f6547a80fd68e8cf3f51ee60a03
staging: rtlwifi: Use proper enum for return in halmac_parse_psd_data_88xx

[ Upstream commit e8edc32d70a4e09160835792eb5d1af71a0eec14 ]

Clang warns:

drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c:2472:11:
warning: implicit conversion from enumeration type 'enum
halmac_cmd_process_status' to different enumeration type 'enum
halmac_ret_status' [-Wenum-conversion]
                        return HALMAC_CMD_PROCESS_ERROR;
                        ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.

Fix this by using the proper enum for allocation failures,
HALMAC_RET_MALLOC_FAIL, which is used in the rest of this file.

Fixes: e4b08e16b7d9 ("staging: r8822be: check kzalloc return or bail")
Link: https://github.com/ClangBuiltLinux/linux/issues/375
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nicholas Mc Guire <hofrat@osadl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c