Module Name: src Committed By: jakllsch Date: Fri Nov 4 15:32:34 UTC 2011
Modified Files: src/sys/dev/pci/hdaudio: hdaudio.c Log Message: Don't attempt to reference a non-existent device. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/dev/pci/hdaudio/hdaudio.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/dev/pci/hdaudio/hdaudio.c diff -u src/sys/dev/pci/hdaudio/hdaudio.c:1.15 src/sys/dev/pci/hdaudio/hdaudio.c:1.16 --- src/sys/dev/pci/hdaudio/hdaudio.c:1.15 Tue Sep 6 10:48:28 2011 +++ src/sys/dev/pci/hdaudio/hdaudio.c Fri Nov 4 15:32:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hdaudio.c,v 1.15 2011/09/06 10:48:28 jmcneill Exp $ */ +/* $NetBSD: hdaudio.c,v 1.16 2011/11/04 15:32:34 jakllsch Exp $ */ /* * Copyright (c) 2009 Precedence Technologies Ltd <supp...@precedence.co.uk> @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.15 2011/09/06 10:48:28 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.16 2011/11/04 15:32:34 jakllsch Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -1477,6 +1477,8 @@ hdaudio_dispatch_fgrp_ioctl(struct hdaud fg = hdaudioioctl_fgrp_lookup(sc, codecid, nid); if (fg == NULL) return ENODEV; + if (fg->fg_device == NULL) + return ENXIO; fgrp_sc = device_private(fg->fg_device); fgrp_dict = device_properties(fg->fg_device);