[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181002221903.19476-7-rkir@google.com>
Date: Tue, 2 Oct 2018 15:18:55 -0700
From: rkir@...gle.com
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org, tkjos@...gle.com,
Roman Kiryanov <rkir@...gle.com>
Subject: [PATCH 07/15] platform: goldfish: pipe: Return status from "deinit"
since "remove" does not do much
From: Roman Kiryanov <rkir@...gle.com>
This way deinit will have a chance to report an error.
Signed-off-by: Roman Kiryanov <rkir@...gle.com>
---
drivers/platform/goldfish/goldfish_pipe.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c
index 445c0c0c66c4..1822d4146778 100644
--- a/drivers/platform/goldfish/goldfish_pipe.c
+++ b/drivers/platform/goldfish/goldfish_pipe.c
@@ -888,13 +888,15 @@ static int goldfish_pipe_device_init(struct platform_device *pdev,
return 0;
}
-static void goldfish_pipe_device_deinit(struct platform_device *pdev,
- struct goldfish_pipe_dev *dev)
+static int goldfish_pipe_device_deinit(struct platform_device *pdev,
+ struct goldfish_pipe_dev *dev)
{
misc_deregister(&dev->miscdev);
tasklet_kill(&dev->irq_tasklet);
kfree(dev->pipes);
free_page((unsigned long)dev->buffers);
+
+ return 0;
}
static int goldfish_pipe_probe(struct platform_device *pdev)
@@ -941,8 +943,7 @@ static int goldfish_pipe_remove(struct platform_device *pdev)
{
struct goldfish_pipe_dev *dev = platform_get_drvdata(pdev);
- goldfish_pipe_device_deinit(pdev, dev);
- return 0;
+ return goldfish_pipe_device_deinit(pdev, dev);
}
static const struct acpi_device_id goldfish_pipe_acpi_match[] = {
--
2.19.0.605.g01d371f741-goog
Powered by blists - more mailing lists