aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/vt6656/power.c
diff options
context:
space:
mode:
authorOscar Carter <oscar.carter@gmx.com>2020-04-25 15:42:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-28 14:16:49 +0200
commit81969fd8abc104d0288837409606c4abf527e224 (patch)
tree7bcffc818c047075963a3e71c9569fff49592342 /drivers/staging/vt6656/power.c
parentstaging:r8188eu: avoid skb_clone for amsdu to msdu conversion (diff)
downloadlinux-dev-81969fd8abc104d0288837409606c4abf527e224.tar.xz
linux-dev-81969fd8abc104d0288837409606c4abf527e224.zip
staging: vt6656: Check the return value of vnt_control_out_* calls
Check the return value of vnt_control_out_* function calls. When necessary modify the function prototype to be able to return the new checked error code. It's safe to modify all the function prototypes without fix the call because the only change is the return value from void to int. If before the call didn't check the return value, now neither. Signed-off-by: Oscar Carter <oscar.carter@gmx.com> Link: https://lore.kernel.org/r/20200425134257.4502-2-oscar.carter@gmx.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/power.c')
-rw-r--r--drivers/staging/vt6656/power.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c
index 7a086c72d5a8..2d8d5a332a63 100644
--- a/drivers/staging/vt6656/power.c
+++ b/drivers/staging/vt6656/power.c
@@ -87,17 +87,23 @@ void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
*
*/
-void vnt_disable_power_saving(struct vnt_private *priv)
+int vnt_disable_power_saving(struct vnt_private *priv)
{
+ int ret;
+
/* disable power saving hw function */
- vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0,
- 0, 0, NULL);
+ ret = vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0,
+ 0, 0, NULL);
+ if (ret)
+ return ret;
/* clear AutoSleep */
vnt_mac_reg_bits_off(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
/* set always listen beacon */
vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
+
+ return 0;
}
/*