[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0912081951140.28834@ask.diku.dk>
Date: Tue, 8 Dec 2009 19:51:34 +0100 (CET)
From: Julia Lawall <julia@...u.dk>
To: isdn@...ux-pingi.de, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: [PATCH] drivers/isdn: eliminate duplicated test
From: Julia Lawall <julia@...u.dk>
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@...u.dk>
---
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 a6624ad..1a1420d 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;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists