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 linux/hdmi: Convert failure bran...



details:   https://anonhg.NetBSD.org/src/rev/100fcdfaa028
branches:  trunk
changeset: 368405:100fcdfaa028
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jul 09 18:21:23 2022 +0000

description:
linux/hdmi: Convert failure branch to kassert for internal invariant.

diffstat:

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

diffs (29 lines):

diff -r 83c554f82caf -r 100fcdfaa028 sys/external/bsd/drm2/linux/linux_hdmi.c
--- a/sys/external/bsd/drm2/linux/linux_hdmi.c  Sat Jul 09 18:18:36 2022 +0000
+++ b/sys/external/bsd/drm2/linux/linux_hdmi.c  Sat Jul 09 18:21:23 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: linux_hdmi.c,v 1.5 2022/07/09 18:18:36 riastradh Exp $ */
+/*     $NetBSD: linux_hdmi.c,v 1.6 2022/07/09 18:21:23 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_hdmi.c,v 1.5 2022/07/09 18:18:36 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_hdmi.c,v 1.6 2022/07/09 18:21:23 riastradh Exp $");
 
 #include <sys/types.h>
 
@@ -72,8 +72,8 @@
 {
        uint8_t *const p = buf;
 
-       if (length < HDMI_INFOFRAME_HEADER_SIZE)
-               return -ENOSPC;
+       KASSERT(length >= HDMI_INFOFRAME_HEADER_SIZE);
+
        if (size < length)
                return -ENOSPC;
 



Home | Main Index | Thread Index | Old Index