Skip to content

Commit b4178ab

Browse files
Alexey DobriyanLinus Torvalds
authored andcommitted
[PATCH] paride_register(): shuffle return values
paride_register() returns 1 on success, 0 on failure and module init code looks like static int __init foo_init(void) { return paride_register(&foo) - 1; } which is not what one get used to. Converted to usual 0/-E convention. In case of kbic driver, unwind registration. It was just return (paride_register(&k951)||paride_register(&k971))-1; Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent f433000 commit b4178ab

16 files changed

Lines changed: 26 additions & 18 deletions

File tree

‎drivers/block/paride/aten.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static struct pi_protocol aten = {
149149

150150
static int __init aten_init(void)
151151
{
152-
return paride_register(&aten)-1;
152+
return paride_register(&aten);
153153
}
154154

155155
static void __exit aten_exit(void)

‎drivers/block/paride/bpck.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static struct pi_protocol bpck = {
464464

465465
static int __init bpck_init(void)
466466
{
467-
return paride_register(&bpck)-1;
467+
return paride_register(&bpck);
468468
}
469469

470470
static void __exit bpck_exit(void)

‎drivers/block/paride/bpck6.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ static int __init bpck6_init(void)
265265
printk(KERN_INFO "bpck6: Copyright 2001 by Micro Solutions, Inc., DeKalb IL. USA\n");
266266
if(verbose)
267267
printk(KERN_DEBUG "bpck6: verbose debug enabled.\n");
268-
return paride_register(&bpck6) - 1;
268+
return paride_register(&bpck6);
269269
}
270270

271271
static void __exit bpck6_exit(void)

‎drivers/block/paride/comm.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static struct pi_protocol comm = {
205205

206206
static int __init comm_init(void)
207207
{
208-
return paride_register(&comm)-1;
208+
return paride_register(&comm);
209209
}
210210

211211
static void __exit comm_exit(void)

‎drivers/block/paride/dstr.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ static struct pi_protocol dstr = {
220220

221221
static int __init dstr_init(void)
222222
{
223-
return paride_register(&dstr)-1;
223+
return paride_register(&dstr);
224224
}
225225

226226
static void __exit dstr_exit(void)

‎drivers/block/paride/epat.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static int __init epat_init(void)
327327
#ifdef CONFIG_PARIDE_EPATC8
328328
epatc8 = 1;
329329
#endif
330-
return paride_register(&epat)-1;
330+
return paride_register(&epat);
331331
}
332332

333333
static void __exit epat_exit(void)

‎drivers/block/paride/epia.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static struct pi_protocol epia = {
303303

304304
static int __init epia_init(void)
305305
{
306-
return paride_register(&epia)-1;
306+
return paride_register(&epia);
307307
}
308308

309309
static void __exit epia_exit(void)

‎drivers/block/paride/fit2.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ static struct pi_protocol fit2 = {
138138

139139
static int __init fit2_init(void)
140140
{
141-
return paride_register(&fit2)-1;
141+
return paride_register(&fit2);
142142
}
143143

144144
static void __exit fit2_exit(void)

‎drivers/block/paride/fit3.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ static struct pi_protocol fit3 = {
198198

199199
static int __init fit3_init(void)
200200
{
201-
return paride_register(&fit3)-1;
201+
return paride_register(&fit3);
202202
}
203203

204204
static void __exit fit3_exit(void)

‎drivers/block/paride/friq.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ static struct pi_protocol friq = {
263263

264264
static int __init friq_init(void)
265265
{
266-
return paride_register(&friq)-1;
266+
return paride_register(&friq);
267267
}
268268

269269
static void __exit friq_exit(void)

0 commit comments

Comments
 (0)