From: Borislav Petkov Date: Tue, 11 Dec 2012 15:05:26 +0000 (+0100) Subject: dma_buf: Cleanup dma_buf_fd X-Git-Tag: next-20130220~9^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=671b716af984442fec9816eaca8235b8da305c58;p=karo-tx-linux.git dma_buf: Cleanup dma_buf_fd Remove redundant 'error' variable. Signed-off-by: Borislav Petkov Signed-off-by: Sumit Semwal --- 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); */ 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);