Module Name: src
Committed By: maya
Date: Thu Oct 17 14:33:02 UTC 2019
Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c
Log Message:
correct error handling.
from Ilja Van Sprundel, thanks.
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/linux/linux_dma_buf.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/external/bsd/drm2/linux/linux_dma_buf.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5 src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.6
--- src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5 Fri Jan 4 23:03:02 2019
+++ src/sys/external/bsd/drm2/linux/linux_dma_buf.c Thu Oct 17 14:33:02 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $ */
+/* $NetBSD: linux_dma_buf.c,v 1.6 2019/10/17 14:33:02 maya Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.6 2019/10/17 14:33:02 maya Exp $");
#include <sys/types.h>
#include <sys/atomic.h>
@@ -133,11 +133,11 @@ dma_buf_get(int fd)
if ((file = fd_getfile(fd)) == NULL) {
error = EBADF;
- goto fail1;
+ goto fail0;
}
if (file->f_type != DTYPE_MISC || file->f_ops != &dmabuf_fileops) {
error = EINVAL;
- goto fail0;
+ goto fail1;
}
dmabuf = file->f_data;