Skip to content

Commit 446a5ec

Browse files
sgilbert182carlescufi
authored andcommitted
i2c: stm32: Minor refactor of i2c_stm32_transfer function
Tidy up of i2c_stm32_transfer and added TX and RX semaphore inits Signed-off-by: Simon Gilbert <[email protected]>
1 parent c38a938 commit 446a5ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/i2c/i2c_ll_stm32.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ static int i2c_stm32_transfer(const struct device *dev, struct i2c_msg *msg,
145145
uint8_t num_msgs, uint16_t slave)
146146
{
147147
struct i2c_stm32_data *data = dev->data;
148-
struct i2c_msg *current, *next;
148+
struct i2c_msg *current;
149+
struct i2c_msg *next = NULL;
149150
int ret = 0;
150151

151152
/* Check for validity of all messages, to prevent having to abort

0 commit comments

Comments
 (0)