diff options
Diffstat (limited to 'drivers/isdn/gigaset/ev-layer.c')
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 53490430a2e1..0bf6a283a5a6 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -442,8 +442,6 @@ static int isdn_getnum(char *p) | |||
442 | { | 442 | { |
443 | int v = -1; | 443 | int v = -1; |
444 | 444 | ||
445 | IFNULLRETVAL(p, -1); | ||
446 | |||
447 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); | 445 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); |
448 | 446 | ||
449 | while (*p >= '0' && *p <= '9') | 447 | while (*p >= '0' && *p <= '9') |
@@ -461,8 +459,6 @@ static int isdn_gethex(char *p) | |||
461 | int v = 0; | 459 | int v = 0; |
462 | int c; | 460 | int c; |
463 | 461 | ||
464 | IFNULLRETVAL(p, -1); | ||
465 | |||
466 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); | 462 | gig_dbg(DEBUG_TRANSCMD, "string: %s", p); |
467 | 463 | ||
468 | if (!*p) | 464 | if (!*p) |
@@ -532,8 +528,6 @@ void gigaset_handle_modem_response(struct cardstate *cs) | |||
532 | int cid; | 528 | int cid; |
533 | int rawstring; | 529 | int rawstring; |
534 | 530 | ||
535 | IFNULLRET(cs); | ||
536 | |||
537 | len = cs->cbytes; | 531 | len = cs->cbytes; |
538 | if (!len) { | 532 | if (!len) { |
539 | /* ignore additional LFs/CRs (M10x config mode or cx100) */ | 533 | /* ignore additional LFs/CRs (M10x config mode or cx100) */ |
@@ -737,14 +731,8 @@ EXPORT_SYMBOL_GPL(gigaset_handle_modem_response); | |||
737 | static void disconnect(struct at_state_t **at_state_p) | 731 | static void disconnect(struct at_state_t **at_state_p) |
738 | { | 732 | { |
739 | unsigned long flags; | 733 | unsigned long flags; |
740 | struct bc_state *bcs; | 734 | struct bc_state *bcs = (*at_state_p)->bcs; |
741 | struct cardstate *cs; | 735 | struct cardstate *cs = (*at_state_p)->cs; |
742 | |||
743 | IFNULLRET(at_state_p); | ||
744 | IFNULLRET(*at_state_p); | ||
745 | bcs = (*at_state_p)->bcs; | ||
746 | cs = (*at_state_p)->cs; | ||
747 | IFNULLRET(cs); | ||
748 | 736 | ||
749 | new_index(&(*at_state_p)->seq_index, MAX_SEQ_INDEX); | 737 | new_index(&(*at_state_p)->seq_index, MAX_SEQ_INDEX); |
750 | 738 | ||
@@ -912,9 +900,6 @@ static struct at_state_t *at_state_from_cid(struct cardstate *cs, int cid) | |||
912 | 900 | ||
913 | static void bchannel_down(struct bc_state *bcs) | 901 | static void bchannel_down(struct bc_state *bcs) |
914 | { | 902 | { |
915 | IFNULLRET(bcs); | ||
916 | IFNULLRET(bcs->cs); | ||
917 | |||
918 | if (bcs->chstate & CHS_B_UP) { | 903 | if (bcs->chstate & CHS_B_UP) { |
919 | bcs->chstate &= ~CHS_B_UP; | 904 | bcs->chstate &= ~CHS_B_UP; |
920 | gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BHUP); | 905 | gigaset_i4l_channel_cmd(bcs, ISDN_STAT_BHUP); |
@@ -932,8 +917,6 @@ static void bchannel_down(struct bc_state *bcs) | |||
932 | 917 | ||
933 | static void bchannel_up(struct bc_state *bcs) | 918 | static void bchannel_up(struct bc_state *bcs) |
934 | { | 919 | { |
935 | IFNULLRET(bcs); | ||
936 | |||
937 | if (!(bcs->chstate & CHS_D_UP)) { | 920 | if (!(bcs->chstate & CHS_D_UP)) { |
938 | dev_notice(bcs->cs->dev, "%s: D channel not up\n", __func__); | 921 | dev_notice(bcs->cs->dev, "%s: D channel not up\n", __func__); |
939 | bcs->chstate |= CHS_D_UP; | 922 | bcs->chstate |= CHS_D_UP; |
@@ -1607,9 +1590,6 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1607 | int curact; | 1590 | int curact; |
1608 | unsigned long flags; | 1591 | unsigned long flags; |
1609 | 1592 | ||
1610 | IFNULLRET(cs); | ||
1611 | IFNULLRET(ev); | ||
1612 | |||
1613 | if (ev->cid >= 0) { | 1593 | if (ev->cid >= 0) { |
1614 | at_state = at_state_from_cid(cs, ev->cid); | 1594 | at_state = at_state_from_cid(cs, ev->cid); |
1615 | if (!at_state) { | 1595 | if (!at_state) { |
@@ -1634,7 +1614,6 @@ static void process_event(struct cardstate *cs, struct event_t *ev) | |||
1634 | 1614 | ||
1635 | /* Setting the pointer to the dial array */ | 1615 | /* Setting the pointer to the dial array */ |
1636 | rep = at_state->replystruct; | 1616 | rep = at_state->replystruct; |
1637 | IFNULLRET(rep); | ||
1638 | 1617 | ||
1639 | if (ev->type == EV_TIMEOUT) { | 1618 | if (ev->type == EV_TIMEOUT) { |
1640 | if (ev->parameter != atomic_read(&at_state->timer_index) | 1619 | if (ev->parameter != atomic_read(&at_state->timer_index) |
@@ -1746,8 +1725,6 @@ static void process_command_flags(struct cardstate *cs) | |||
1746 | int i; | 1725 | int i; |
1747 | int sequence; | 1726 | int sequence; |
1748 | 1727 | ||
1749 | IFNULLRET(cs); | ||
1750 | |||
1751 | atomic_set(&cs->commands_pending, 0); | 1728 | atomic_set(&cs->commands_pending, 0); |
1752 | 1729 | ||
1753 | if (cs->cur_at_seq) { | 1730 | if (cs->cur_at_seq) { |
@@ -1968,9 +1945,6 @@ void gigaset_handle_event(unsigned long data) | |||
1968 | { | 1945 | { |
1969 | struct cardstate *cs = (struct cardstate *) data; | 1946 | struct cardstate *cs = (struct cardstate *) data; |
1970 | 1947 | ||
1971 | IFNULLRET(cs); | ||
1972 | IFNULLRET(cs->inbuf); | ||
1973 | |||
1974 | /* handle incoming data on control/common channel */ | 1948 | /* handle incoming data on control/common channel */ |
1975 | if (atomic_read(&cs->inbuf->head) != atomic_read(&cs->inbuf->tail)) { | 1949 | if (atomic_read(&cs->inbuf->head) != atomic_read(&cs->inbuf->tail)) { |
1976 | gig_dbg(DEBUG_INTR, "processing new data"); | 1950 | gig_dbg(DEBUG_INTR, "processing new data"); |