Commit b9a947dd authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Mark Brown

spi: pic32: remove unnecessary of_node_get()

Almost all spi drivers assign spi master->dev.of_node from
its parent platform device without additional refcounting.
It seems of_node_get() in pic32_spi_probe() is unnecessary
and there is no corresponding of_node_put().

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent b9e49520
...@@ -774,7 +774,7 @@ static int pic32_spi_probe(struct platform_device *pdev) ...@@ -774,7 +774,7 @@ static int pic32_spi_probe(struct platform_device *pdev)
if (ret) if (ret)
goto err_master; goto err_master;
master->dev.of_node = of_node_get(pdev->dev.of_node); master->dev.of_node = pdev->dev.of_node;
master->mode_bits = SPI_MODE_3 | SPI_MODE_0 | SPI_CS_HIGH; master->mode_bits = SPI_MODE_3 | SPI_MODE_0 | SPI_CS_HIGH;
master->num_chipselect = 1; /* single chip-select */ master->num_chipselect = 1; /* single chip-select */
master->max_speed_hz = clk_get_rate(pic32s->clk); master->max_speed_hz = clk_get_rate(pic32s->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment