diff options
author | Oscar Carter <oscar.carter@gmx.com> | 2020-04-25 15:42:56 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-04-28 14:16:49 +0200 |
commit | 81969fd8abc104d0288837409606c4abf527e224 (patch) | |
tree | 7bcffc818c047075963a3e71c9569fff49592342 /drivers/staging/vt6656/power.c | |
parent | 628cbd971a927abe6388d44320e351c337b331e4 (diff) |
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.c | 12 |
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; } /* |