diff options
author | Julia Lawall <julia@diku.dk> | 2009-12-21 09:25:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-04 00:25:54 -0500 |
commit | 073bd90f03d98bc3168865f21573c9b232777c13 (patch) | |
tree | 86efa3dbae26d7d0694dccb0103d1f2d19cba860 | |
parent | 8ffd32083c849dcf476e56e6c5f728c80797ecdd (diff) |
drivers/isdn: eliminate duplicated test
The code checked slot_rx twice. Check slot_tx by analogy with the bank
case.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E;
@@
(
*E && E
|
*E || E
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/isdn/hardware/mISDN/hfcmulti.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c index a6624ad252c5..1a1420d7a828 100644 --- a/drivers/isdn/hardware/mISDN/hfcmulti.c +++ b/drivers/isdn/hardware/mISDN/hfcmulti.c | |||
@@ -3152,7 +3152,7 @@ static void | |||
3152 | hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx, | 3152 | hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx, |
3153 | int slot_rx, int bank_rx) | 3153 | int slot_rx, int bank_rx) |
3154 | { | 3154 | { |
3155 | if (slot_rx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) { | 3155 | if (slot_tx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) { |
3156 | /* disable PCM */ | 3156 | /* disable PCM */ |
3157 | mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0); | 3157 | mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0); |
3158 | return; | 3158 | return; |