media: i2c: max9286: Use dev_err_probe() helper
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Wed, 8 Dec 2021 12:17:56 +0000 (13:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:22:49 +0000 (10:22 +0200)
commitd7678a7a55d063a67b5b3432f9ca97c7785bc255
tree38c245c70a12ae872453315bfa0e2f3f4e28ef61
parent7f6defe0fabc79f29603c6fa3c80e4fe0456a3e9
media: i2c: max9286: Use dev_err_probe() helper

[ Upstream commit df78b858e773967112b4444400fb7bb5bd7a9d8a ]

Use the dev_err_probe() helper, instead of open-coding the same
operation. While at it retrieve the error once and use it from
'ret' instead of retrieving it twice.

Link: https://lore.kernel.org/linux-media/20211208121756.3051565-1-niklas.soderlund+renesas@ragnatech.se
Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Niklas S\xF6derlund <niklas.soderlund+renesas@ragnatech.se>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/i2c/max9286.c