Skip to content

Commit 41685ae

Browse files
Wolfram Sanggregkh
authored andcommitted
i2c: jz4780: drop superfluous init
commit 27bfeb5a0619554d9734fb39e14f0e80fa7c342c upstream. David reported that the length for memset was incorrect (element sizes were not taken into account). Then I saw that we are clearing kzalloced memory, so we can simply drop this code. Reported-by: David Binderman <dcb314@hotmail.com> Reviewed-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 05429bb commit 41685ae

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

drivers/i2c/busses/i2c-jz4780.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -786,10 +786,6 @@ static int jz4780_i2c_probe(struct platform_device *pdev)
786786

787787
jz4780_i2c_writew(i2c, JZ4780_I2C_INTM, 0x0);
788788

789-
i2c->cmd = 0;
790-
memset(i2c->cmd_buf, 0, BUFSIZE);
791-
memset(i2c->data_buf, 0, BUFSIZE);
792-
793789
i2c->irq = platform_get_irq(pdev, 0);
794790
ret = devm_request_irq(&pdev->dev, i2c->irq, jz4780_i2c_irq, 0,
795791
dev_name(&pdev->dev), i2c);

0 commit comments

Comments
 (0)