summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-16 20:44:04 +0300
committerWolfram Sang <wsa@the-dreams.de>2018-02-27 15:51:05 +0300
commitbead21687f293cb1e1365703f11cf1cc6aaaf833 (patch)
tree6387d6b4136a26ce6eb9f1cdf66aed2b15df62a8 /drivers/i2c
parent939c5a46e5cac7524b327d43ae826fd6941fa2aa (diff)
downloadlinux-bead21687f293cb1e1365703f11cf1cc6aaaf833.tar.xz
i2c-stm32f4: remove redundant initialization of pointer reg
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/busses/i2c-stm32f4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f4.c b/drivers/i2c/busses/i2c-stm32f4.c
index 47c8d00de53f..ba600d77a3f8 100644
--- a/drivers/i2c/busses/i2c-stm32f4.c
+++ b/drivers/i2c/busses/i2c-stm32f4.c
@@ -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);