[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1355238326-9482-1-git-send-email-bp@alien8.de>
Date: Tue, 11 Dec 2012 16:05:26 +0100
From: Borislav Petkov <bp@...en8.de>
To: Sumit Semwal <sumit.semwal@...aro.org>
Cc: Greg Kroah-Hartman <greg@...ah.com>,
linaro-mm-sig@...ts.linaro.org,
LKML <linux-kernel@...r.kernel.org>,
Borislav Petkov <bp@...en8.de>
Subject: [PATCH] dma_buf: Cleanup dma_buf_fd
Remove redundant 'error' variable.
Signed-off-by: Borislav Petkov <bp@...en8.de>
---
drivers/base/dma-buf.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c
index 460e22dee36d..a384b63be757 100644
--- a/drivers/base/dma-buf.c
+++ b/drivers/base/dma-buf.c
@@ -134,15 +134,14 @@ EXPORT_SYMBOL_GPL(dma_buf_export);
*/
int dma_buf_fd(struct dma_buf *dmabuf, int flags)
{
- int error, fd;
+ int fd;
if (!dmabuf || !dmabuf->file)
return -EINVAL;
- error = get_unused_fd_flags(flags);
- if (error < 0)
- return error;
- fd = error;
+ fd = get_unused_fd_flags(flags);
+ if (fd < 0)
+ return fd;
fd_install(fd, dmabuf->file);
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists