Skip to content

Commit d38407e

Browse files
committed
spi-v2.0: Phytium: fix uninitialized ret in spi_phytium_write
drivers/spi/spi-phytium-common.c:333:7: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized] 333 | if (ret) { | ^~~ CC [M] drivers/input/serio/pcips2.o drivers/spi/spi-phytium-common.c:325:9: note: initialize the variable 'ret' to silence this warning 325 | int ret; | ^ | = 0 1 error generated. Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 50a6b6c commit d38407e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/spi/spi-phytium-common.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ EXPORT_SYMBOL_GPL(spi_phytium_flash_write);
322322
int spi_phytium_write(struct phytium_spi *fts, u8 cs, u8 dfs, u8 mode,
323323
u8 tmode, u8 flags, u8 spi_write_flag)
324324
{
325-
int ret;
325+
int ret = 0;
326326
u32 len;
327327
u64 smem_tx;
328328
u8 first = 1;

0 commit comments

Comments
 (0)