Skip to content

Commit

Permalink
i2c-stm32f4: remove redundant initialization of pointer reg
Browse files Browse the repository at this point in the history
The pointer reg is assigned a value that is never read, it is later
overwritten with a new value, hence the redundant initialization can
be removed.

Cleans up clang warning:
drivers/i2c/busses/i2c-stm32f4.c:352:16: warning: Value stored to 'reg'
during its initialization is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
  • Loading branch information
Colin Ian King authored and Wolfram Sang committed Feb 27, 2018
1 parent 939c5a4 commit bead216
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/i2c/busses/i2c-stm32f4.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static void stm32f4_i2c_read_msg(struct stm32f4_i2c_dev *i2c_dev)
static void stm32f4_i2c_terminate_xfer(struct stm32f4_i2c_dev *i2c_dev)
{
struct stm32f4_i2c_msg *msg = &i2c_dev->msg;
void __iomem *reg = i2c_dev->base + STM32F4_I2C_CR2;
void __iomem *reg;

stm32f4_i2c_disable_irq(i2c_dev);

Expand Down

0 comments on commit bead216

Please sign in to comment.