Skip to content

Commit

Permalink
spi: pic32: remove unnecessary of_node_get()
Browse files Browse the repository at this point in the history
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: Alexey Khoroshilov <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
khoroshilov authored and broonie committed Sep 7, 2018
1 parent b9e4952 commit b9a947d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-pic32.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@ static int pic32_spi_probe(struct platform_device *pdev)
if (ret)
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->num_chipselect = 1; /* single chip-select */
master->max_speed_hz = clk_get_rate(pic32s->clk);
Expand Down

0 comments on commit b9a947d

Please sign in to comment.