summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915/intel_hdmi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/drm/i915/intel_hdmi.c')
-rw-r--r--sys/dev/pci/drm/i915/intel_hdmi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/pci/drm/i915/intel_hdmi.c b/sys/dev/pci/drm/i915/intel_hdmi.c
index d5c48175971..da65d288164 100644
--- a/sys/dev/pci/drm/i915/intel_hdmi.c
+++ b/sys/dev/pci/drm/i915/intel_hdmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: intel_hdmi.c,v 1.4 2013/09/06 08:24:07 mpi Exp $ */
+/* $OpenBSD: intel_hdmi.c,v 1.5 2014/01/21 08:57:22 kettenis Exp $ */
/*
* Copyright 2006 Dave Airlie <airlied@linux.ie>
* Copyright © 2006-2009 Intel Corporation
@@ -1042,15 +1042,13 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg, enum port port)
struct drm_encoder *encoder;
struct intel_connector *intel_connector;
- intel_dig_port = malloc(sizeof(struct intel_digital_port), M_DRM,
- M_WAITOK | M_ZERO);
+ intel_dig_port = kzalloc(sizeof(struct intel_digital_port), GFP_KERNEL);
if (!intel_dig_port)
return;
- intel_connector = malloc(sizeof(struct intel_connector), M_DRM,
- M_WAITOK | M_ZERO);
+ intel_connector = kzalloc(sizeof(struct intel_connector), GFP_KERNEL);
if (!intel_connector) {
- free(intel_dig_port, M_DRM);
+ kfree(intel_dig_port);
return;
}