diff options
author | Tilman Schmidt <tilman@imap.cc> | 2012-04-25 09:02:20 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-07 22:37:56 -0400 |
commit | 81fa7b82570ec4337d328e6aee45689455508821 (patch) | |
tree | 79cdb018f497a18635ea78a171cd211845e0b605 /drivers/isdn/gigaset/capi.c | |
parent | 7643ffbd02ac46f880f64bed24a85d453b501418 (diff) |
isdn/gigaset: unify function return values
Various functions in the Gigaset driver were using different
conventions for the meaning of their int return values.
Align them to the usual negative error numbers convention.
Inspired-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset/capi.c')
-rw-r--r-- | drivers/isdn/gigaset/capi.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c index 86cee65d2e9f..27e4a3e21d64 100644 --- a/drivers/isdn/gigaset/capi.c +++ b/drivers/isdn/gigaset/capi.c | |||
@@ -2346,7 +2346,7 @@ static const struct file_operations gigaset_proc_fops = { | |||
2346 | * @cs: device descriptor structure. | 2346 | * @cs: device descriptor structure. |
2347 | * @isdnid: device name. | 2347 | * @isdnid: device name. |
2348 | * | 2348 | * |
2349 | * Return value: 1 for success, 0 for failure | 2349 | * Return value: 0 on success, error code < 0 on failure |
2350 | */ | 2350 | */ |
2351 | int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) | 2351 | int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) |
2352 | { | 2352 | { |
@@ -2356,7 +2356,7 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) | |||
2356 | iif = kmalloc(sizeof(*iif), GFP_KERNEL); | 2356 | iif = kmalloc(sizeof(*iif), GFP_KERNEL); |
2357 | if (!iif) { | 2357 | if (!iif) { |
2358 | pr_err("%s: out of memory\n", __func__); | 2358 | pr_err("%s: out of memory\n", __func__); |
2359 | return 0; | 2359 | return -ENOMEM; |
2360 | } | 2360 | } |
2361 | 2361 | ||
2362 | /* prepare controller structure */ | 2362 | /* prepare controller structure */ |
@@ -2380,12 +2380,12 @@ int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid) | |||
2380 | if (rc) { | 2380 | if (rc) { |
2381 | pr_err("attach_capi_ctr failed (%d)\n", rc); | 2381 | pr_err("attach_capi_ctr failed (%d)\n", rc); |
2382 | kfree(iif); | 2382 | kfree(iif); |
2383 | return 0; | 2383 | return rc; |
2384 | } | 2384 | } |
2385 | 2385 | ||
2386 | cs->iif = iif; | 2386 | cs->iif = iif; |
2387 | cs->hw_hdr_len = CAPI_DATA_B3_REQ_LEN; | 2387 | cs->hw_hdr_len = CAPI_DATA_B3_REQ_LEN; |
2388 | return 1; | 2388 | return 0; |
2389 | } | 2389 | } |
2390 | 2390 | ||
2391 | /** | 2391 | /** |