if (add_interval(&data->io_db, base, num) != 0) { ret = CS_IN_USE; 
if (add_interval(&data->io_db, start, size) != 0) { ret = -EBUSY; 
static int adjust_io(struct pcmcia_socket *s, adjust_t *adj){	struct socket_data *data = s->resource_data;	kio_addr_t base, num;	int ret = CS_SUCCESS;	base = adj->resource.io.BasePort;	num = adj->resource.io.NumPorts;	if ((base < 0) || (base > 0xffff))		return CS_BAD_BASE;	if ((num <= 0) || (base+num > 0x10000) || (base+num <= base))		return CS_BAD_SIZE;	down(&rsrc_sem);	switch (adj->Action) {	case ADD_MANAGED_RESOURCE:		if (add_interval(&data->io_db, base, num) != 0) {			ret = CS_IN_USE;			break;		}#ifdef CONFIG_PCMCIA_PROBE		if (probe_io)			do_io_probe(s, base, num);#endif		break;	case REMOVE_MANAGED_RESOURCE:		sub_interval(&data->io_db, base, num);		break;	default:		ret = CS_UNSUPPORTED_FUNCTION;		break;	}	up(&rsrc_sem);	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/22916638b124e859b595099bd0c86a1e09e767fb/rsrc_nonstatic.c/buggy/drivers/pcmcia/rsrc_nonstatic.c