if (!dev || count + 1 > sizeof str) 
if (!dev || !dev->brightness || count + 1 > sizeof str) 
acpi_video_device_write_brightness(struct file *file,				   const char __user * buffer,				   size_t count, loff_t * data){	struct seq_file *m = (struct seq_file *)file->private_data;	struct acpi_video_device *dev = (struct acpi_video_device *)m->private;	char str[4] = { 0 };	unsigned int level = 0;	int i;	ACPI_FUNCTION_TRACE("acpi_video_device_write_brightness");	if (!dev || count + 1 > sizeof str)		return_VALUE(-EINVAL);	if (copy_from_user(str, buffer, count))		return_VALUE(-EFAULT);	str[count] = 0;	level = simple_strtoul(str, NULL, 0);	if (level > 100)		return_VALUE(-EFAULT);	/* validate though the list of available levels */	for (i = 0; i < dev->brightness->count; i++)		if (level == dev->brightness->levels[i]) {			if (ACPI_SUCCESS			    (acpi_video_device_lcd_set_level(dev, level)))				dev->brightness->curr = level;			break;		}	return_VALUE(count);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/59d399d357a7705568f424c6e861ee8657f7f655/video.c/buggy/drivers/acpi/video.c