diff options
author | Borislav Petkov <bp@alien8.de> | 2012-12-11 10:05:26 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 15:57:07 -0500 |
commit | f5e097f0465e874ac76e8b6ae355b6faa83973a1 (patch) | |
tree | 03ca3e8762a68bee6d886fd148c3ac77ec5ba1b6 /drivers/base | |
parent | 1a5d76dbe825fa6deba3d8979bbd334ea17b6dcc (diff) |
dma_buf: Cleanup dma_buf_fd
Remove redundant 'error' variable.
Signed-off-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/dma-buf.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c index a3f79c495a41..ff5b745c4705 100644 --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c | |||
@@ -134,15 +134,14 @@ EXPORT_SYMBOL_GPL(dma_buf_export); | |||
134 | */ | 134 | */ |
135 | int dma_buf_fd(struct dma_buf *dmabuf, int flags) | 135 | int dma_buf_fd(struct dma_buf *dmabuf, int flags) |
136 | { | 136 | { |
137 | int error, fd; | 137 | int fd; |
138 | 138 | ||
139 | if (!dmabuf || !dmabuf->file) | 139 | if (!dmabuf || !dmabuf->file) |
140 | return -EINVAL; | 140 | return -EINVAL; |
141 | 141 | ||
142 | error = get_unused_fd_flags(flags); | 142 | fd = get_unused_fd_flags(flags); |
143 | if (error < 0) | 143 | if (fd < 0) |
144 | return error; | 144 | return fd; |
145 | fd = error; | ||
146 | 145 | ||
147 | fd_install(fd, dmabuf->file); | 146 | fd_install(fd, dmabuf->file); |
148 | 147 | ||