summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorRoman Kiryanov <rkir@google.com>2018-04-30 14:10:39 -0700
committerRoman Kiryanov <rkir@google.com>2018-05-01 12:58:46 -0700
commite008465076abb1abfacf51a381ea152fb2594eee (patch)
tree8d637b23a7cde0be826c7e9440838190697aab36 /drivers/platform
parent9846d12d4819a42f27f5ab5fc92cc07afb331f9e (diff)
goldfish: pipe: ANDROID: fix whitespace
Make checkpatch.pl happy. Bug: 72717639 Bug: 66884503 Change-Id: Ie8758cc91595eba57a0c9144cfba9309da62c966 Signed-off-by: Roman Kiryanov <rkir@google.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/goldfish/goldfish_pipe_v2.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/platform/goldfish/goldfish_pipe_v2.c b/drivers/platform/goldfish/goldfish_pipe_v2.c
index 7688ed093363..e8db17628bb6 100644
--- a/drivers/platform/goldfish/goldfish_pipe_v2.c
+++ b/drivers/platform/goldfish/goldfish_pipe_v2.c
@@ -331,7 +331,7 @@ static void populate_rw_params(
command->rw_params.buffers_count = buffer_idx + 1;
}
-static int transfer_max_buffers(struct goldfish_pipe* pipe,
+static int transfer_max_buffers(struct goldfish_pipe *pipe,
unsigned long address, unsigned long address_end, int is_write,
unsigned long last_page, unsigned int last_page_size,
s32 *consumed_size, int *status)
@@ -685,6 +685,7 @@ static int goldfish_pipe_open(struct inode *inode, struct file *file)
/* Allocate new pipe kernel object */
struct goldfish_pipe *pipe = kzalloc(sizeof(*pipe), GFP_KERNEL);
+
if (pipe == NULL)
return -ENOMEM;
@@ -812,12 +813,12 @@ static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
* is to just allocate a page and place the buffers in it.
*/
BUILD_BUG_ON(sizeof(*dev->buffers) > PAGE_SIZE);
- page = (char*)__get_free_page(GFP_KERNEL);
+ page = (char *)__get_free_page(GFP_KERNEL);
if (!page) {
kfree(dev->pipes);
return -ENOMEM;
}
- dev->buffers = (struct goldfish_pipe_dev_buffers*)page;
+ dev->buffers = (struct goldfish_pipe_dev_buffers *)page;
/* Send the buffer addresses to the host */
{
@@ -840,7 +841,8 @@ static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
return 0;
}
-static void goldfish_pipe_device_deinit_v2(struct platform_device *pdev) {
+static void goldfish_pipe_device_deinit_v2(struct platform_device *pdev)
+{
misc_deregister(&goldfish_pipe_miscdev);
kfree(goldfish_pipe_dev.pipes);
free_page((unsigned long)goldfish_pipe_dev.buffers);