From 073bd90f03d98bc3168865f21573c9b232777c13 Mon Sep 17 00:00:00 2001
From: Julia Lawall
Date: Mon, 21 Dec 2009 14:25:32 +0000
Subject: 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/)
//
@@
expression E;
@@
(
*E && E
|
*E || E
)
//
Signed-off-by: Julia Lawall
Cc: Karsten Keil
Signed-off-by: Andrew Morton
Signed-off-by: David S. Miller
---
drivers/isdn/hardware/mISDN/hfcmulti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'drivers/isdn/hardware')
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
hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx,
int slot_rx, int bank_rx)
{
- if (slot_rx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) {
+ if (slot_tx < 0 || slot_rx < 0 || bank_tx < 0 || bank_rx < 0) {
/* disable PCM */
mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0);
return;
--
cgit v1.2.3