Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/linux correct error handling.



details:   https://anonhg.NetBSD.org/src/rev/e192101cff53
branches:  trunk
changeset: 460329:e192101cff53
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Oct 17 14:33:02 2019 +0000

description:
correct error handling.

from Ilja Van Sprundel, thanks.

diffstat:

 sys/external/bsd/drm2/linux/linux_dma_buf.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r 09e3aabbfa31 -r e192101cff53 sys/external/bsd/drm2/linux/linux_dma_buf.c
--- a/sys/external/bsd/drm2/linux/linux_dma_buf.c       Thu Oct 17 14:00:28 2019 +0000
+++ b/sys/external/bsd/drm2/linux/linux_dma_buf.c       Thu Oct 17 14:33:02 2019 +0000
@@ -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 @@
 
        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;



Home | Main Index | Thread Index | Old Index