Skip to content
Commit 6826fdbd authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jonathan Cameron
Browse files

staging: iio: ad9832: allocate data before using



The regulator changes assigned data to an uninitialized pointer:

drivers/staging/iio/frequency/ad9832.c: In function 'ad9832_probe':
drivers/staging/iio/frequency/ad9832.c:214:11: error: 'st' may be used uninitialized in this function [-Werror=maybe-uninitialized]

This moves the allocation of the 'st' structure before its first
use, as it should have been.

Fixes: 43a07e48 ("staging: iio: ad9832: clean-up regulator 'reg'")
Fixes: a98461d7 ("staging: iio: ad9832: add DVDD regulator")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 993403b9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment