summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMinghao Chi <chi.minghao@zte.com.cn>2022-05-05 02:19:54 +0000
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2022-05-17 22:33:43 +0200
commitc157a606e7525409208a51bd6663d6da3757d69e (patch)
tree7d82a7ef8e4a4d5790c8a20954aba01a8936c245
parent6742ca620bd929ee96bd6724692132056203fb95 (diff)
downloadlinux-c157a606e7525409208a51bd6663d6da3757d69e.tar.gz
linux-c157a606e7525409208a51bd6663d6da3757d69e.tar.bz2
linux-c157a606e7525409208a51bd6663d6da3757d69e.zip
i3c/master: simplify the return expression of i3c_hci_remove()
Simplify the return expression. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20220505021954.54524-1-chi.minghao@zte.com.cn
-rw-r--r--drivers/i3c/master/mipi-i3c-hci/core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/i3c/master/mipi-i3c-hci/core.c b/drivers/i3c/master/mipi-i3c-hci/core.c
index 8c01123dc4ed..6aef5ce43cc1 100644
--- a/drivers/i3c/master/mipi-i3c-hci/core.c
+++ b/drivers/i3c/master/mipi-i3c-hci/core.c
@@ -768,13 +768,8 @@ static int i3c_hci_probe(struct platform_device *pdev)
static int i3c_hci_remove(struct platform_device *pdev)
{
struct i3c_hci *hci = platform_get_drvdata(pdev);
- int ret;
- ret = i3c_master_unregister(&hci->master);
- if (ret)
- return ret;
-
- return 0;
+ return i3c_master_unregister(&hci->master);
}
static const __maybe_unused struct of_device_id i3c_hci_of_match[] = {