2010-01-29 09:51:36

by Roel Kluin

[permalink] [raw]
Subject: [PATCH] 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.

Signed-off-by: Roel Kluin <[email protected]>
---
diff --git a/drivers/isdn/hardware/mISDN/hfcmulti.c b/drivers/isdn/hardware/mISDN/hfcmulti.c
index 1a1420d..ad36df9 100644
--- a/drivers/isdn/hardware/mISDN/hfcmulti.c
+++ b/drivers/isdn/hardware/mISDN/hfcmulti.c
@@ -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;


2010-02-04 04:16:55

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] mISDN: positive error return should be negative in mode_hfcmulti()

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

> 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.
>
> Signed-off-by: Roel Kluin <[email protected]>

Applied.