mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] dma_buf: Cleanup dma_buf_fd
@ 2012-12-11 15:05 Borislav Petkov
  0 siblings, 0 replies; only message in thread
From: Borislav Petkov @ 2012-12-11 15:05 UTC (permalink / raw)
  To: Sumit Semwal; +Cc: Greg Kroah-Hartman, linaro-mm-sig, LKML, Borislav Petkov

Remove redundant 'error' variable.

Signed-off-by: Borislav Petkov <bp@alien8.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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-12-11 15:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-11 15:05 [PATCH] dma_buf: Cleanup dma_buf_fd Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®