if (!tp->write) 
if (IS_ERR(tp->write)) 
tty3270_alloc_view(void){	struct tty3270 *tp;	int pages;	tp = kmalloc(sizeof(struct tty3270),GFP_KERNEL);	if (!tp)		goto out_err;	memset(tp, 0, sizeof(struct tty3270));	tp->freemem_pages =		kmalloc(sizeof(void *) * TTY3270_STRING_PAGES, GFP_KERNEL);	if (!tp->freemem_pages)		goto out_tp;	INIT_LIST_HEAD(&tp->freemem);	init_timer(&tp->timer);	for (pages = 0; pages < TTY3270_STRING_PAGES; pages++) {		tp->freemem_pages[pages] = (void *)			__get_free_pages(GFP_KERNEL|GFP_DMA, 0);		if (!tp->freemem_pages[pages])			goto out_pages;		add_string_memory(&tp->freemem,				  tp->freemem_pages[pages], PAGE_SIZE);	}	tp->write = raw3270_request_alloc(TTY3270_OUTPUT_BUFFER_SIZE);	if (!tp->write)		goto out_pages;	tp->read = raw3270_request_alloc(0);	if (!tp->read)		goto out_write;	tp->kreset = raw3270_request_alloc(1);	if (!tp->kreset)		goto out_read;	tp->kbd = kbd_alloc();	if (!tp->kbd)		goto out_reset;	return tp;out_reset:	raw3270_request_free(tp->kreset);out_read:	raw3270_request_free(tp->read);out_write:	raw3270_request_free(tp->write);out_pages:	while (pages--)		free_pages((unsigned long) tp->freemem_pages[pages], 0);	kfree(tp->freemem_pages);out_tp:	kfree(tp);out_err:	return ERR_PTR(-ENOMEM);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/ed3cb6f039bb296457bfd2877cba6ad0287d8d54/tty3270.c/buggy/drivers/s390/char/tty3270.c