diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c
index a375d0a..8601b7a 100644
--- a/drivers/isdn/gigaset/asyncdata.c
+++ b/drivers/isdn/gigaset/asyncdata.c
@@ -117,20 +117,14 @@
 {
 	struct cardstate *cs = inbuf->cs;
 	struct bc_state *bcs = inbuf->bcs;
-	int inputstate;
-	__u16 fcs;
-	struct sk_buff *skb;
+	int inputstate = bcs->inputstate;
+	__u16 fcs = bcs->fcs;
+	struct sk_buff *skb = bcs->skb;
 	unsigned char error;
 	struct sk_buff *compskb;
 	int startbytes = numbytes;
 	int l;
 
-	IFNULLRETVAL(bcs, numbytes);
-	inputstate = bcs->inputstate;
-	fcs = bcs->fcs;
-	skb = bcs->skb;
-	IFNULLRETVAL(skb, numbytes);
-
 	if (unlikely(inputstate & INS_byte_stuff)) {
 		inputstate &= ~INS_byte_stuff;
 		goto byte_stuff;
@@ -292,15 +286,10 @@
 {
 	struct cardstate *cs = inbuf->cs;
 	struct bc_state *bcs = inbuf->bcs;
-	int inputstate;
-	struct sk_buff *skb;
+	int inputstate = bcs->inputstate;
+	struct sk_buff *skb = bcs->skb;
 	int startbytes = numbytes;
 
-	IFNULLRETVAL(bcs, numbytes);
-	inputstate = bcs->inputstate;
-	skb = bcs->skb;
-	IFNULLRETVAL(skb, numbytes);
-
 	for (;;) {
 		/* add character */
 		inputstate |= INS_have_data;
@@ -577,11 +566,7 @@
  */
 int gigaset_m10x_send_skb(struct bc_state *bcs, struct sk_buff *skb)
 {
-	unsigned len;
-
-	IFNULLRETVAL(bcs, -EFAULT);
-	IFNULLRETVAL(skb, -EFAULT);
-	len = skb->len;
+	unsigned len = skb->len;
 
 	if (bcs->proto2 == ISDN_PROTO_L2_HDLC)
 		skb = HDLC_Encode(skb, HW_HDR_LEN, 0);
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c
index 1cf48cf..b75f2f3 100644
--- a/drivers/isdn/gigaset/bas-gigaset.c
+++ b/drivers/isdn/gigaset/bas-gigaset.c
@@ -205,7 +205,6 @@
 {
 #ifdef CONFIG_GIGASET_DEBUG
 	int i;
-	IFNULLRET(tag);
 	gig_dbg(level, "%s urb(0x%08lx)->{", tag, (unsigned long) urb);
 	if (urb) {
 		gig_dbg(level,
@@ -309,8 +308,6 @@
 {
 	unsigned long flags;
 
-	IFNULLRET(ucs);
-
 	spin_lock_irqsave(&ucs->lock, flags);
 	switch (ucs->pending) {
 	case 0:
@@ -366,13 +363,9 @@
 static void cmd_in_timeout(unsigned long data)
 {
 	struct cardstate *cs = (struct cardstate *) data;
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	unsigned long flags;
 
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
-
 	spin_lock_irqsave(&cs->lock, flags);
 	if (unlikely(!atomic_read(&cs->connected))) {
 		gig_dbg(DEBUG_USBREQ, "%s: disconnected", __func__);
@@ -406,14 +399,9 @@
  */
 static int atread_submit(struct cardstate *cs, int timeout)
 {
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	int ret;
 
-	IFNULLRETVAL(cs, -EINVAL);
-	ucs = cs->hw.bas;
-	IFNULLRETVAL(ucs, -EINVAL);
-	IFNULLRETVAL(ucs->urb_cmd_in, -EINVAL);
-
 	gig_dbg(DEBUG_USBREQ, "-------> HD_READ_ATMESSAGE (%d)",
 		ucs->rcvbuf_size);
 
@@ -479,20 +467,14 @@
  */
 static void read_int_callback(struct urb *urb, struct pt_regs *regs)
 {
-	struct cardstate *cs;
-	struct bas_cardstate *ucs;
+	struct cardstate *cs = urb->context;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	struct bc_state *bcs;
 	unsigned long flags;
 	int status;
 	unsigned l;
 	int channel;
 
-	IFNULLRET(urb);
-	cs = (struct cardstate *) urb->context;
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
-
 	if (unlikely(!atomic_read(&cs->connected))) {
 		warn("%s: disconnected", __func__);
 		return;
@@ -638,20 +620,12 @@
  */
 static void read_ctrl_callback(struct urb *urb, struct pt_regs *regs)
 {
-	struct cardstate *cs;
-	struct bas_cardstate *ucs;
+	struct inbuf_t *inbuf = urb->context;
+	struct cardstate *cs = inbuf->cs;
+	struct bas_cardstate *ucs = cs->hw.bas;
+	int have_data = 0;
 	unsigned numbytes;
 	unsigned long flags;
-	struct inbuf_t *inbuf;
-	int have_data = 0;
-
-	IFNULLRET(urb);
-	inbuf = (struct inbuf_t *) urb->context;
-	IFNULLRET(inbuf);
-	cs = inbuf->cs;
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
 
 	spin_lock_irqsave(&cs->lock, flags);
 	if (unlikely(!atomic_read(&cs->connected))) {
@@ -747,10 +721,6 @@
 	unsigned long flags;
 	int i, rc;
 
-	IFNULLRET(urb);
-	IFNULLRET(urb->context);
-	IFNULLRET(cardstate);
-
 	/* status codes not worth bothering the tasklet with */
 	if (unlikely(urb->status == -ENOENT || urb->status == -ECONNRESET ||
 		     urb->status == -EINPROGRESS)) {
@@ -759,9 +729,8 @@
 		return;
 	}
 
-	bcs = (struct bc_state *) urb->context;
+	bcs = urb->context;
 	ubc = bcs->hw.bas;
-	IFNULLRET(ubc);
 
 	spin_lock_irqsave(&ubc->isoinlock, flags);
 	if (likely(ubc->isoindone == NULL)) {
@@ -813,10 +782,6 @@
 	struct bas_bc_state *ubc;
 	unsigned long flags;
 
-	IFNULLRET(urb);
-	IFNULLRET(urb->context);
-	IFNULLRET(cardstate);
-
 	/* status codes not worth bothering the tasklet with */
 	if (unlikely(urb->status == -ENOENT || urb->status == -ECONNRESET ||
 		     urb->status == -EINPROGRESS)) {
@@ -826,10 +791,8 @@
 	}
 
 	/* pass URB context to tasklet */
-	ucx = (struct isow_urbctx_t *) urb->context;
-	IFNULLRET(ucx->bcs);
+	ucx = urb->context;
 	ubc = ucx->bcs->hw.bas;
-	IFNULLRET(ubc);
 
 	spin_lock_irqsave(&ubc->isooutlock, flags);
 	ubc->isooutovfl = ubc->isooutdone;
@@ -848,15 +811,11 @@
  */
 static int starturbs(struct bc_state *bcs)
 {
+	struct bas_bc_state *ubc = bcs->hw.bas;
 	struct urb *urb;
-	struct bas_bc_state *ubc;
 	int j, k;
 	int rc;
 
-	IFNULLRETVAL(bcs, -EFAULT);
-	ubc = bcs->hw.bas;
-	IFNULLRETVAL(ubc, -EFAULT);
-
 	/* initialize L2 reception */
 	if (bcs->proto2 == ISDN_PROTO_L2_HDLC)
 		bcs->inputstate |= INS_flag_hunt;
@@ -955,8 +914,6 @@
 {
 	int k, rc;
 
-	IFNULLRET(ubc);
-
 	atomic_set(&ubc->running, 0);
 
 	for (k = 0; k < BAS_INURBS; ++k) {
@@ -988,18 +945,11 @@
  */
 static int submit_iso_write_urb(struct isow_urbctx_t *ucx)
 {
-	struct urb *urb;
-	struct bas_bc_state *ubc;
+	struct urb *urb = ucx->urb;
+	struct bas_bc_state *ubc = ucx->bcs->hw.bas;
 	struct usb_iso_packet_descriptor *ifd;
 	int corrbytes, nframe, rc;
 
-	IFNULLRETVAL(ucx, -EFAULT);
-	urb = ucx->urb;
-	IFNULLRETVAL(urb, -EFAULT);
-	IFNULLRETVAL(ucx->bcs, -EFAULT);
-	ubc = ucx->bcs->hw.bas;
-	IFNULLRETVAL(ubc, -EFAULT);
-
 	/* urb->dev is clobbered by USB subsystem */
 	urb->dev = ucx->bcs->cs->hw.bas->udev;
 	urb->transfer_flags = URB_ISO_ASAP;
@@ -1065,9 +1015,9 @@
  */
 static void write_iso_tasklet(unsigned long data)
 {
-	struct bc_state *bcs;
-	struct bas_bc_state *ubc;
-	struct cardstate *cs;
+	struct bc_state *bcs = (struct bc_state *) data;
+	struct bas_bc_state *ubc = bcs->hw.bas;
+	struct cardstate *cs = bcs->cs;
 	struct isow_urbctx_t *done, *next, *ovfl;
 	struct urb *urb;
 	struct usb_iso_packet_descriptor *ifd;
@@ -1077,13 +1027,6 @@
 	struct sk_buff *skb;
 	int len;
 
-	bcs = (struct bc_state *) data;
-	IFNULLRET(bcs);
-	ubc = bcs->hw.bas;
-	IFNULLRET(ubc);
-	cs = bcs->cs;
-	IFNULLRET(cs);
-
 	/* loop while completed URBs arrive in time */
 	for (;;) {
 		if (unlikely(!atomic_read(&cs->connected))) {
@@ -1237,21 +1180,14 @@
  */
 static void read_iso_tasklet(unsigned long data)
 {
-	struct bc_state *bcs;
-	struct bas_bc_state *ubc;
-	struct cardstate *cs;
+	struct bc_state *bcs = (struct bc_state *) data;
+	struct bas_bc_state *ubc = bcs->hw.bas;
+	struct cardstate *cs = bcs->cs;
 	struct urb *urb;
 	char *rcvbuf;
 	unsigned long flags;
 	int totleft, numbytes, offset, frame, rc;
 
-	bcs = (struct bc_state *) data;
-	IFNULLRET(bcs);
-	ubc = bcs->hw.bas;
-	IFNULLRET(ubc);
-	cs = bcs->cs;
-	IFNULLRET(cs);
-
 	/* loop while more completed URBs arrive in the meantime */
 	for (;;) {
 		if (unlikely(!atomic_read(&cs->connected))) {
@@ -1383,15 +1319,10 @@
 static void req_timeout(unsigned long data)
 {
 	struct bc_state *bcs = (struct bc_state *) data;
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = bcs->cs->hw.bas;
 	int pending;
 	unsigned long flags;
 
-	IFNULLRET(bcs);
-	IFNULLRET(bcs->cs);
-	ucs = bcs->cs->hw.bas;
-	IFNULLRET(ucs);
-
 	check_pending(ucs);
 
 	spin_lock_irqsave(&ucs->lock, flags);
@@ -1441,14 +1372,9 @@
  */
 static void write_ctrl_callback(struct urb *urb, struct pt_regs *regs)
 {
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = urb->context;
 	unsigned long flags;
 
-	IFNULLRET(urb);
-	IFNULLRET(urb->context);
-	IFNULLRET(cardstate);
-
-	ucs = (struct bas_cardstate *) urb->context;
 	spin_lock_irqsave(&ucs->lock, flags);
 	if (urb->status && ucs->pending) {
 		dev_err(&ucs->interface->dev,
@@ -1482,16 +1408,10 @@
  */
 static int req_submit(struct bc_state *bcs, int req, int val, int timeout)
 {
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = bcs->cs->hw.bas;
 	int ret;
 	unsigned long flags;
 
-	IFNULLRETVAL(bcs, -EINVAL);
-	IFNULLRETVAL(bcs->cs, -EINVAL);
-	ucs = bcs->cs->hw.bas;
-	IFNULLRETVAL(ucs, -EINVAL);
-	IFNULLRETVAL(ucs->urb_ctrl, -EINVAL);
-
 	gig_dbg(DEBUG_USBREQ, "-------> 0x%02x (%d)", req, val);
 
 	spin_lock_irqsave(&ucs->lock, flags);
@@ -1551,8 +1471,6 @@
 {
 	int req, ret;
 
-	IFNULLRETVAL(bcs, -EINVAL);
-
 	if ((ret = starturbs(bcs)) < 0) {
 		dev_err(bcs->cs->dev,
 			"could not start isochronous I/O for channel %d\n",
@@ -1585,8 +1503,6 @@
 {
 	int req, ret;
 
-	IFNULLRETVAL(bcs, -EINVAL);
-
 	if (!(atomic_read(&bcs->cs->hw.bas->basstate) &
 	      (bcs->channel ? BS_B2OPEN : BS_B1OPEN))) {
 		/* channel not running: just signal common.c */
@@ -1613,11 +1529,7 @@
  */
 static void complete_cb(struct cardstate *cs)
 {
-	struct cmdbuf_t *cb;
-
-	IFNULLRET(cs);
-	cb = cs->cmdbuf;
-	IFNULLRET(cb);
+	struct cmdbuf_t *cb = cs->cmdbuf;
 
 	/* unqueue completed buffer */
 	cs->cmdbytes -= cs->curlen;
@@ -1649,15 +1561,9 @@
  */
 static void write_command_callback(struct urb *urb, struct pt_regs *regs)
 {
-	struct cardstate *cs;
+	struct cardstate *cs = urb->context;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	unsigned long flags;
-	struct bas_cardstate *ucs;
-
-	IFNULLRET(urb);
-	cs = (struct cardstate *) urb->context;
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
 
 	/* check status */
 	switch (urb->status) {
@@ -1709,11 +1615,7 @@
 static void atrdy_timeout(unsigned long data)
 {
 	struct cardstate *cs = (struct cardstate *) data;
-	struct bas_cardstate *ucs;
-
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
+	struct bas_cardstate *ucs = cs->hw.bas;
 
 	dev_warn(cs->dev, "timeout waiting for HD_READY_SEND_ATDATA\n");
 
@@ -1736,14 +1638,9 @@
  */
 static int atwrite_submit(struct cardstate *cs, unsigned char *buf, int len)
 {
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	int ret;
 
-	IFNULLRETVAL(cs, -EFAULT);
-	ucs = cs->hw.bas;
-	IFNULLRETVAL(ucs, -EFAULT);
-	IFNULLRETVAL(ucs->urb_cmd_out, -EFAULT);
-
 	gig_dbg(DEBUG_USBREQ, "-------> HD_WRITE_ATMESSAGE (%d)", len);
 
 	if (ucs->urb_cmd_out->status == -EINPROGRESS) {
@@ -1795,15 +1692,11 @@
 static int start_cbsend(struct cardstate *cs)
 {
 	struct cmdbuf_t *cb;
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	unsigned long flags;
 	int rc;
 	int retval = 0;
 
-	IFNULLRETVAL(cs, -EFAULT);
-	ucs = cs->hw.bas;
-	IFNULLRETVAL(ucs, -EFAULT);
-
 	/* check if AT channel is open */
 	if (!(atomic_read(&ucs->basstate) & BS_ATOPEN)) {
 		gig_dbg(DEBUG_TRANSCMD|DEBUG_LOCKCMD, "AT channel not open");
@@ -2084,17 +1977,12 @@
  */
 static void freeurbs(struct cardstate *cs)
 {
-	struct bas_cardstate *ucs;
+	struct bas_cardstate *ucs = cs->hw.bas;
 	struct bas_bc_state *ubc;
 	int i, j;
 
-	IFNULLRET(cs);
-	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
-
 	for (j = 0; j < 2; ++j) {
 		ubc = cs->bcs[j].hw.bas;
-		IFNULLCONT(ubc);
 		for (i = 0; i < BAS_OUTURBS; ++i)
 			if (ubc->isoouturbs[i].urb) {
 				usb_kill_urb(ubc->isoouturbs[i].urb);
@@ -2160,8 +2048,6 @@
 	int i, j;
 	int ret;
 
-	IFNULLRETVAL(udev, -ENODEV);
-
 	gig_dbg(DEBUG_ANY,
 		"%s: Check if device matches .. (Vendor: 0x%x, Product: 0x%x)",
 		__func__, le16_to_cpu(udev->descriptor.idVendor),
@@ -2314,9 +2200,7 @@
 
 	cs = usb_get_intfdata(interface);
 
-	IFNULLRET(cs);
 	ucs = cs->hw.bas;
-	IFNULLRET(ucs);
 
 	dev_info(cs->dev, "disconnecting Gigaset base\n");
 	gigaset_stop(cs);
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index 5349043..0bf6a28 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -442,8 +442,6 @@
 {
 	int v = -1;
 
-	IFNULLRETVAL(p, -1);
-
 	gig_dbg(DEBUG_TRANSCMD, "string: %s", p);
 
 	while (*p >= '0' && *p <= '9')
@@ -461,8 +459,6 @@
 	int v = 0;
 	int c;
 
-	IFNULLRETVAL(p, -1);
-
 	gig_dbg(DEBUG_TRANSCMD, "string: %s", p);
 
 	if (!*p)
@@ -532,8 +528,6 @@
 	int cid;
 	int rawstring;
 
-	IFNULLRET(cs);
-
 	len = cs->cbytes;
 	if (!len) {
 		/* ignore additional LFs/CRs (M10x config mode or cx100) */
@@ -737,14 +731,8 @@
 static void disconnect(struct at_state_t **at_state_p)
 {
 	unsigned long flags;
-	struct bc_state *bcs;
-	struct cardstate *cs;
-
-	IFNULLRET(at_state_p);
-	IFNULLRET(*at_state_p);
-	bcs = (*at_state_p)->bcs;
-	cs = (*at_state_p)->cs;
-	IFNULLRET(cs);
+	struct bc_state *bcs = (*at_state_p)->bcs;
+	struct cardstate *cs = (*at_state_p)->cs;
 
 	new_index(&(*at_state_p)->seq_index, MAX_SEQ_INDEX);
 
@@ -912,9 +900,6 @@
 
 static void bchannel_down(struct bc_state *bcs)
 {
-	IFNULLRET(bcs);
-	IFNULLRET(bcs->cs);
-
 	if (bcs->chstate & CHS_B_UP) {
 		bcs->chstate &= ~CHS_B_UP;
 		gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BHUP);
@@ -932,8 +917,6 @@
 
 static void bchannel_up(struct bc_state *bcs)
 {
-	IFNULLRET(bcs);
-
 	if (!(bcs->chstate & CHS_D_UP)) {
 		dev_notice(bcs->cs->dev, "%s: D channel not up\n", __func__);
 		bcs->chstate |= CHS_D_UP;
@@ -1607,9 +1590,6 @@
 	int curact;
 	unsigned long flags;
 
-	IFNULLRET(cs);
-	IFNULLRET(ev);
-
 	if (ev->cid >= 0) {
 		at_state = at_state_from_cid(cs, ev->cid);
 		if (!at_state) {
@@ -1634,7 +1614,6 @@
 
 	/* Setting the pointer to the dial array */
 	rep = at_state->replystruct;
-	IFNULLRET(rep);
 
 	if (ev->type == EV_TIMEOUT) {
 		if (ev->parameter != atomic_read(&at_state->timer_index)
@@ -1746,8 +1725,6 @@
 	int i;
 	int sequence;
 
-	IFNULLRET(cs);
-
 	atomic_set(&cs->commands_pending, 0);
 
 	if (cs->cur_at_seq) {
@@ -1968,9 +1945,6 @@
 {
 	struct cardstate *cs = (struct cardstate *) data;
 
-	IFNULLRET(cs);
-	IFNULLRET(cs->inbuf);
-
 	/* handle incoming data on control/common channel */
 	if (atomic_read(&cs->inbuf->head) != atomic_read(&cs->inbuf->tail)) {
 		gig_dbg(DEBUG_INTR, "processing new data");
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
index 0445757..7acae34 100644
--- a/drivers/isdn/gigaset/gigaset.h
+++ b/drivers/isdn/gigaset/gigaset.h
@@ -72,33 +72,6 @@
 
 #define MAXACT 3
 
-#define IFNULL(a) \
-	if (unlikely(!(a)))
-
-#define IFNULLRET(a) \
-	if (unlikely(!(a))) { \
-		err("%s==NULL at %s:%d!", #a, __FILE__, __LINE__); \
-		return; \
-	}
-
-#define IFNULLRETVAL(a,b) \
-	if (unlikely(!(a))) { \
-		err("%s==NULL at %s:%d!", #a, __FILE__, __LINE__); \
-		return (b); \
-	}
-
-#define IFNULLCONT(a) \
-	if (unlikely(!(a))) { \
-		err("%s==NULL at %s:%d!", #a, __FILE__, __LINE__); \
-		continue; \
-	}
-
-#define IFNULLGOTO(a,b) \
-	if (unlikely(!(a))) { \
-		err("%s==NULL at %s:%d!", #a, __FILE__, __LINE__); \
-		goto b; \
-	}
-
 extern int gigaset_debuglevel;	/* "needs" cast to (enum debuglevel) */
 
 /* any combination of these can be given with the 'debug=' parameter to insmod,
diff --git a/drivers/isdn/gigaset/isocdata.c b/drivers/isdn/gigaset/isocdata.c
index 4a00d22..0b7e5b6 100644
--- a/drivers/isdn/gigaset/isocdata.c
+++ b/drivers/isdn/gigaset/isocdata.c
@@ -247,8 +247,6 @@
 	static char dbgline[3 * 32 + 1];
 	static const char hexdigit[] = "0123456789abcdef";
 	int i = 0;
-	IFNULLRET(tag);
-	IFNULLRET(bytes);
 	while (count-- > 0) {
 		if (i > sizeof(dbgline) - 4) {
 			dbgline[i] = '\0';
@@ -663,14 +661,10 @@
 static inline void hdlc_unpack(unsigned char *src, unsigned count,
 			       struct bc_state *bcs)
 {
-	struct bas_bc_state *ubc;
+	struct bas_bc_state *ubc = bcs->hw.bas;
 	int inputstate;
 	unsigned seqlen, inbyte, inbits;
 
-	IFNULLRET(bcs);
-	ubc = bcs->hw.bas;
-	IFNULLRET(ubc);
-
 	/* load previous state:
 	 * inputstate = set of flag bits:
 	 * - INS_flag_hunt: no complete opening flag received since connection setup or last abort
@@ -995,11 +989,7 @@
  */
 int gigaset_isoc_send_skb(struct bc_state *bcs, struct sk_buff *skb)
 {
-	int len;
-
-	IFNULLRETVAL(bcs, -EFAULT);
-	IFNULLRETVAL(skb, -EFAULT);
-	len = skb->len;
+	int len = skb->len;
 
 	skb_queue_tail(&bcs->squeue, skb);
 	gig_dbg(DEBUG_ISO, "%s: skb queued, qlen=%d",
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c
index a977dd5..e1a3eeb 100644
--- a/drivers/isdn/gigaset/usb-gigaset.c
+++ b/drivers/isdn/gigaset/usb-gigaset.c
@@ -365,18 +365,12 @@
  */
 static void gigaset_read_int_callback(struct urb *urb, struct pt_regs *regs)
 {
+	struct inbuf_t *inbuf = urb->context;
+	struct cardstate *cs = inbuf->cs;
 	int resubmit = 0;
 	int r;
-	struct cardstate *cs;
 	unsigned numbytes;
 	unsigned char *src;
-	struct inbuf_t *inbuf;
-
-	IFNULLRET(urb);
-	inbuf = (struct inbuf_t *) urb->context;
-	IFNULLRET(inbuf);
-	cs = inbuf->cs;
-	IFNULLRET(cs);
 
 	if (!atomic_read(&cs->connected)) {
 		err("%s: disconnected", __func__);
@@ -421,9 +415,8 @@
 /* This callback routine is called when data was transmitted to the device. */
 static void gigaset_write_bulk_callback(struct urb *urb, struct pt_regs *regs)
 {
-	struct cardstate *cs = (struct cardstate *) urb->context;
+	struct cardstate *cs = urb->context;
 
-	IFNULLRET(cs);
 #ifdef CONFIG_GIGASET_DEBUG
 	if (!atomic_read(&cs->connected)) {
 		err("%s: not connected", __func__);
@@ -632,20 +625,13 @@
 /* Send data from current skb to the device. */
 static int write_modem(struct cardstate *cs)
 {
-	int ret;
+	int ret = 0;
 	int count;
 	struct bc_state *bcs = &cs->bcs[0]; /* only one channel */
 	struct usb_cardstate *ucs = cs->hw.usb;
 
-	IFNULLRETVAL(bcs->tx_skb, -EINVAL);
-
 	gig_dbg(DEBUG_WRITE, "len: %d...", bcs->tx_skb->len);
 
-	ret = -ENODEV;
-	IFNULLGOTO(ucs->bulk_out_buffer, error);
-	IFNULLGOTO(ucs->bulk_out_urb, error);
-	ret = 0;
-
 	if (!bcs->tx_skb->len) {
 		dev_kfree_skb_any(bcs->tx_skb);
 		bcs->tx_skb = NULL;
@@ -683,11 +669,6 @@
 	}
 
 	return ret;
-error:
-	dev_kfree_skb_any(bcs->tx_skb);
-	bcs->tx_skb = NULL;
-	return ret;
-
 }
 
 static int gigaset_probe(struct usb_interface *interface,
