Author: cem
Date: Thu May 12 02:46:29 2016
New Revision: 299504
URL: https://svnweb.freebsd.org/changeset/base/299504

Log:
  snd_hda(4): Don't pass bogus sizeof()s to unused sysctl arg2 parameter (again)
  
  More of the same sort of issue as r299503, just missed some sysctls added in a
  different place than the others.
  
  Reported by:  Coverity
  CIDs:         1007692, 1009677, 1009678
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/sys/dev/sound/pci/hda/hdaa.c

Modified: head/sys/dev/sound/pci/hda/hdaa.c
==============================================================================
--- head/sys/dev/sound/pci/hda/hdaa.c   Thu May 12 02:41:38 2016        
(r299503)
+++ head/sys/dev/sound/pci/hda/hdaa.c   Thu May 12 02:46:29 2016        
(r299504)
@@ -1553,20 +1553,20 @@ hdaa_widget_parse(struct hdaa_widget *w)
        SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
            SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
            buf, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
-           w, sizeof(w), hdaa_sysctl_caps, "A", "Node capabilities");
+           w, 0, hdaa_sysctl_caps, "A", "Node capabilities");
        if (w->type == HDA_PARAM_AUDIO_WIDGET_CAP_TYPE_PIN_COMPLEX) {
                snprintf(buf, sizeof(buf), "nid%d_config", w->nid);
                SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
                    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
                    buf, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_MPSAFE,
-                   &w->wclass.pin.newconf, sizeof(&w->wclass.pin.newconf),
-                   hdaa_sysctl_config, "A", "Current pin configuration");
+                   &w->wclass.pin.newconf, 0, hdaa_sysctl_config, "A",
+                   "Current pin configuration");
                snprintf(buf, sizeof(buf), "nid%d_original", w->nid);
                SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
                    SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
                    buf, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE,
-                   &w->wclass.pin.original, sizeof(&w->wclass.pin.original),
-                   hdaa_sysctl_config, "A", "Original pin configuration");
+                   &w->wclass.pin.original, 0, hdaa_sysctl_config, "A",
+                   "Original pin configuration");
        }
        hdaa_lock(w->devinfo);
 }
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to