Commit 073bd90f authored by Julia Lawall's avatar Julia Lawall Committed by David S. Miller

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: default avatarJulia Lawall <julia@diku.dk>
Cc: Karsten Keil <isdn@linux-pingi.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8ffd3208
...@@ -3152,7 +3152,7 @@ static void ...@@ -3152,7 +3152,7 @@ static void
hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx, hfcmulti_pcm(struct hfc_multi *hc, int ch, int slot_tx, int bank_tx,
int slot_rx, int bank_rx) 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 */ /* disable PCM */
mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0); mode_hfcmulti(hc, ch, hc->chan[ch].protocol, -1, 0, -1, 0);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment