rtw_p2p_get2 calls functions that can fail with -EFAULT. Return the error code from the called functions. Signed-off-by: Abdun Nihaal <abdun.nihaal@xxxxxxxxx> --- - Newly added in V4 drivers/staging/r8188eu/os_dep/ioctl_linux.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/r8188eu/os_dep/ioctl_linux.c b/drivers/staging/r8188eu/os_dep/ioctl_linux.c index 35f7ba66a7cf..99c7f9369d2a 100644 --- a/drivers/staging/r8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/r8188eu/os_dep/ioctl_linux.c @@ -3452,19 +3452,19 @@ static int rtw_p2p_get2(struct net_device *dev, DBG_88E("[%s] extra = %s\n", __func__, (char *)wrqu->data.pointer); if (!memcmp(extra, "wpsCM =", 6)) { wrqu->data.length -= 6; - rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]); + ret = rtw_p2p_get_wps_configmethod(dev, info, wrqu, &extra[6]); } else if (!memcmp(extra, "devN =", 5)) { wrqu->data.length -= 5; - rtw_p2p_get_device_name(dev, info, wrqu, &extra[5]); + ret = rtw_p2p_get_device_name(dev, info, wrqu, &extra[5]); } else if (!memcmp(extra, "dev_type =", 9)) { wrqu->data.length -= 9; - rtw_p2p_get_device_type(dev, info, wrqu, &extra[9]); + ret = rtw_p2p_get_device_type(dev, info, wrqu, &extra[9]); } else if (!memcmp(extra, "go_devadd =", 10)) { wrqu->data.length -= 10; - rtw_p2p_get_go_device_address(dev, info, wrqu, &extra[10]); + ret = rtw_p2p_get_go_device_address(dev, info, wrqu, &extra[10]); } else if (!memcmp(extra, "InvProc =", 8)) { wrqu->data.length -= 8; - rtw_p2p_get_invitation_procedure(dev, info, wrqu, &extra[8]); + ret = rtw_p2p_get_invitation_procedure(dev, info, wrqu, &extra[8]); } return ret; -- 2.34.1