int drm_get_head(drm_device_t *dev, drm_head_t *head) 
static int drm_get_head(drm_device_t *dev, drm_head_t *head) 
int drm_get_head(drm_device_t *dev, drm_head_t *head){	drm_head_t **heads = drm_heads;	int ret;	int minor;	DRM_DEBUG("\n");	for (minor = 0; minor < drm_cards_limit; minor++, heads++) {		if (!*heads) {						*head = (drm_head_t) {				.dev = dev,				.device = MKDEV(DRM_MAJOR, minor),				.minor = minor,			};						if ((ret = drm_proc_init(dev, minor, drm_proc_root, &head->dev_root))) {				printk (KERN_ERR "DRM: Failed to initialize /proc/dri.\n");				goto err_g1;			}						head->dev_class = drm_sysfs_device_add(drm_class,							       MKDEV(DRM_MAJOR,								     minor),							       &dev->pdev->dev,							       "card%d", minor);			if (IS_ERR(head->dev_class)) {				printk(KERN_ERR "DRM: Error sysfs_device_add.\n");				ret = PTR_ERR(head->dev_class);				goto err_g2;			}			*heads = head;			DRM_DEBUG("new minor assigned %d\n", minor);			return 0;		}	}	DRM_ERROR("out of minors\n");	return -ENOMEM;err_g2:	drm_proc_cleanup(minor, drm_proc_root, head->dev_root);err_g1:	*head = (drm_head_t) {.dev = NULL};	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c94f70298529d99ac6e1ee7709f61eab00adeb39/drm_stub.c/buggy/drivers/char/drm/drm_stub.c