Skip to content

Commit a22b0a2

Browse files
Demon000jic23
authored andcommitted
iio: adc: ad4130: zero-initialize clock init data
The clk_init_data struct does not have all its members initialized, causing issues when trying to expose the internal clock on the CLK pin. Fix this by zero-initializing the clk_init_data struct. Fixes: 6209406 ("iio: adc: ad4130: add AD4130 driver") Signed-off-by: Cosmin Tanislav <demonsingur@gmail.com> Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240207132007.253768-1-demonsingur@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 4cb8184 commit a22b0a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/adc/ad4130.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ static int ad4130_setup_int_clk(struct ad4130_state *st)
18211821
{
18221822
struct device *dev = &st->spi->dev;
18231823
struct device_node *of_node = dev_of_node(dev);
1824-
struct clk_init_data init;
1824+
struct clk_init_data init = {};
18251825
const char *clk_name;
18261826
int ret;
18271827

0 commit comments

Comments
 (0)