Initialise head->agpdev *after* the memset(), not before.

This commit is contained in:
Doug Rabson 2000-06-09 15:38:17 +00:00
parent db02ce25b8
commit dfbbf874d4
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ SRCS = init.c memory.c auth.c context.c drawable.c bufs.c \
lists.c lock.c ioctl.c fops.c vm.c dma.c sysctl.c \
agpsupport.c ctxbitmap.c
SRCS += device_if.h bus_if.h pci_if.h
CFLAGS += ${DEBUG_FLAGS} -I.. # -DDRM_AGP
CFLAGS += ${DEBUG_FLAGS} -I.. -DDRM_AGP
@:
ln -sf /sys @

View file

@ -238,8 +238,8 @@ drm_agp_head_t *drm_agp_init(void)
if (agp_available) {
if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS)))
return NULL;
head->agpdev = agpdev;
memset((void *)head, 0, sizeof(*head));
head->agpdev = agpdev;
agp_get_info(agpdev, &head->info);
head->memory = NULL;
#if 0 /* bogus */