Skip to contentSkip to conversation

mISDN: positive error return should be negative in mode_hfcmulti()

PATCH Applied Roel Kluin 2 participants 2 messages Jan 29, 2010 – Feb 4, 2010

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 mISDN: positive error return should be negative in mode_hfcmulti()

The error return should be negative. Its only caller that acts upon its return, handle_bmsg(), transmits the positive error but can also return negative errors.

---

drivers/isdn/hardware/mISDN/hfcmulti.c +1 -1
index 1a1420d..ad36df9 100644
@@ -2846,7 +2846,7 @@ mode_hfcmulti(struct hfc_multi *hc, int ch, int protocol, int slot_tx,
 	int conf;
 
 	if (ch < 0 || ch > 31)
-		return EINVAL;
+		return -EINVAL;
 	oslot_tx = hc->chan[ch].slot_tx;
 	oslot_rx = hc->chan[ch].slot_rx;
 	conf = hc->chan[ch].conf;
Applied
#1 lore raw

From: Roel Kluin <[email protected]>
Date: Fri, 29 Jan 2010 10:57:20 +0100

Quoted 4 lines

The error return should be negative. Its only caller that acts upon its return, handle_bmsg(), transmits the positive error but can also return negative errors.

Applied.