Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: ks7010: Fix the initialization of the 'sleep_status' structure

'sleep_status' has 3 atomic_t members. Initialize the 3 of them instead of
initializing only 2 of them and setting 0 twice to the same variable.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/d2e52a33a9beab41879551d0ae2fdfc99970adab.1626856991.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Christophe JAILLET and committed by
Greg Kroah-Hartman
56315e55 66c1c64e

+1 -1
+1 -1
drivers/staging/ks7010/ks7010_sdio.c
··· 939 939 memset(&priv->wstats, 0, sizeof(priv->wstats)); 940 940 941 941 /* sleep mode */ 942 + atomic_set(&priv->sleepstatus.status, 0); 942 943 atomic_set(&priv->sleepstatus.doze_request, 0); 943 - atomic_set(&priv->sleepstatus.wakeup_request, 0); 944 944 atomic_set(&priv->sleepstatus.wakeup_request, 0); 945 945 946 946 trx_device_init(priv);