ASoC: rk817: remove redundant assignment to pointer node, add missing of_node_put
authorColin Ian King <colin.king@canonical.com>
Thu, 3 Jun 2021 11:36:59 +0000 (12:36 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 7 Jun 2021 15:20:03 +0000 (16:20 +0100)
commitd50b86b3f6abc4ff8a35f706a6b8251a2d4cf58f
tree323e31b4461d6b17aa8c264057a80996879507d9
parent54f6731394520d706c3133aab17aa90434bcf1aa
ASoC: rk817: remove redundant assignment to pointer node, add missing of_node_put

The pointer node is being initialized with a value that is never read and
it is being updated later with a new value.  The initialization is
redundant and can be removed.

The function is missing a of_node_put on node, fix this by adding the call
before returning.

Addresses-Coverity: ("Unused value")
Fixes: 0d6a04da9b25 ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20210603113659.82031-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rk817_codec.c