提交 022b68f2 编写于 作者: H Horatiu Vultur 提交者: Greg Kroah-Hartman

nvmem: lan9662-otp: Change return type of lan9662_otp_wait_flag_clear()

The blamed commit introduced the following smatch warning in the
function lan9662_otp_wait_flag_clear:
drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'

Fix this by changing the return type of the function
lan9662_otp_wait_flag_clear() to be int instead of bool.

Fixes: 9e8f208a ("nvmem: lan9662-otp: add support")
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: NSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221118063840.6357-5-srinivas.kandagatla@linaro.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 58e92c4a
......@@ -36,7 +36,7 @@ struct lan9662_otp {
void __iomem *base;
};
static bool lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
static int lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
{
u32 val;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册