@@ -167,10 +167,9 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
167
167
goto error ;
168
168
}
169
169
newfunc = kzalloc (sizeof (* newfunc ), GFP_KERNEL );
170
- if (!newfunc ) {
171
- err ("out of system memory\n" );
170
+ if (!newfunc )
172
171
return - ENOMEM ;
173
- }
172
+
174
173
newfunc -> busno = cur_func -> busno ;
175
174
newfunc -> device = device ;
176
175
cur_func -> next = newfunc ;
@@ -205,10 +204,9 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
205
204
for (i = 0 ; i < 32 ; i ++ ) {
206
205
if (func -> devices [i ]) {
207
206
newfunc = kzalloc (sizeof (* newfunc ), GFP_KERNEL );
208
- if (!newfunc ) {
209
- err ("out of system memory\n" );
207
+ if (!newfunc )
210
208
return - ENOMEM ;
211
- }
209
+
212
210
newfunc -> busno = sec_number ;
213
211
newfunc -> device = (u8 ) i ;
214
212
for (j = 0 ; j < 4 ; j ++ )
@@ -233,10 +231,9 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
233
231
}
234
232
235
233
newfunc = kzalloc (sizeof (* newfunc ), GFP_KERNEL );
236
- if (!newfunc ) {
237
- err ("out of system memory\n" );
234
+ if (!newfunc )
238
235
return - ENOMEM ;
239
- }
236
+
240
237
newfunc -> busno = cur_func -> busno ;
241
238
newfunc -> device = device ;
242
239
for (j = 0 ; j < 4 ; j ++ )
@@ -279,10 +276,9 @@ int ibmphp_configure_card(struct pci_func *func, u8 slotno)
279
276
if (func -> devices [i ]) {
280
277
debug ("inside for loop, device is %x\n" , i );
281
278
newfunc = kzalloc (sizeof (* newfunc ), GFP_KERNEL );
282
- if (!newfunc ) {
283
- err (" out of system memory\n" );
279
+ if (!newfunc )
284
280
return - ENOMEM ;
285
- }
281
+
286
282
newfunc -> busno = sec_number ;
287
283
newfunc -> device = (u8 ) i ;
288
284
for (j = 0 ; j < 4 ; j ++ )
@@ -405,10 +401,9 @@ static int configure_device(struct pci_func *func)
405
401
406
402
io [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
407
403
408
- if (!io [count ]) {
409
- err ("out of system memory\n" );
404
+ if (!io [count ])
410
405
return - ENOMEM ;
411
- }
406
+
412
407
io [count ]-> type = IO ;
413
408
io [count ]-> busno = func -> busno ;
414
409
io [count ]-> devfunc = PCI_DEVFN (func -> device , func -> function );
@@ -442,10 +437,9 @@ static int configure_device(struct pci_func *func)
442
437
debug ("len[count] in PFMEM %x, count %d\n" , len [count ], count );
443
438
444
439
pfmem [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
445
- if (!pfmem [count ]) {
446
- err ("out of system memory\n" );
440
+ if (!pfmem [count ])
447
441
return - ENOMEM ;
448
- }
442
+
449
443
pfmem [count ]-> type = PFMEM ;
450
444
pfmem [count ]-> busno = func -> busno ;
451
445
pfmem [count ]-> devfunc = PCI_DEVFN (func -> device ,
@@ -458,7 +452,6 @@ static int configure_device(struct pci_func *func)
458
452
} else {
459
453
mem_tmp = kzalloc (sizeof (* mem_tmp ), GFP_KERNEL );
460
454
if (!mem_tmp ) {
461
- err ("out of system memory\n" );
462
455
kfree (pfmem [count ]);
463
456
return - ENOMEM ;
464
457
}
@@ -508,10 +501,9 @@ static int configure_device(struct pci_func *func)
508
501
debug ("len[count] in Mem %x, count %d\n" , len [count ], count );
509
502
510
503
mem [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
511
- if (!mem [count ]) {
512
- err ("out of system memory\n" );
504
+ if (!mem [count ])
513
505
return - ENOMEM ;
514
- }
506
+
515
507
mem [count ]-> type = MEM ;
516
508
mem [count ]-> busno = func -> busno ;
517
509
mem [count ]-> devfunc = PCI_DEVFN (func -> device ,
@@ -674,7 +666,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
674
666
bus_io [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
675
667
676
668
if (!bus_io [count ]) {
677
- err ("out of system memory\n" );
678
669
retval = - ENOMEM ;
679
670
goto error ;
680
671
}
@@ -706,7 +697,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
706
697
707
698
bus_pfmem [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
708
699
if (!bus_pfmem [count ]) {
709
- err ("out of system memory\n" );
710
700
retval = - ENOMEM ;
711
701
goto error ;
712
702
}
@@ -722,7 +712,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
722
712
} else {
723
713
mem_tmp = kzalloc (sizeof (* mem_tmp ), GFP_KERNEL );
724
714
if (!mem_tmp ) {
725
- err ("out of system memory\n" );
726
715
retval = - ENOMEM ;
727
716
goto error ;
728
717
}
@@ -763,7 +752,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
763
752
764
753
bus_mem [count ] = kzalloc (sizeof (struct resource_node ), GFP_KERNEL );
765
754
if (!bus_mem [count ]) {
766
- err ("out of system memory\n" );
767
755
retval = - ENOMEM ;
768
756
goto error ;
769
757
}
@@ -834,7 +822,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
834
822
io = kzalloc (sizeof (* io ), GFP_KERNEL );
835
823
836
824
if (!io ) {
837
- err ("out of system memory\n" );
838
825
retval = - ENOMEM ;
839
826
goto error ;
840
827
}
@@ -856,7 +843,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
856
843
debug ("it wants %x memory behind the bridge\n" , amount_needed -> mem );
857
844
mem = kzalloc (sizeof (* mem ), GFP_KERNEL );
858
845
if (!mem ) {
859
- err ("out of system memory\n" );
860
846
retval = - ENOMEM ;
861
847
goto error ;
862
848
}
@@ -878,7 +864,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
878
864
debug ("it wants %x pfmemory behind the bridge\n" , amount_needed -> pfmem );
879
865
pfmem = kzalloc (sizeof (* pfmem ), GFP_KERNEL );
880
866
if (!pfmem ) {
881
- err ("out of system memory\n" );
882
867
retval = - ENOMEM ;
883
868
goto error ;
884
869
}
@@ -893,7 +878,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
893
878
} else {
894
879
mem_tmp = kzalloc (sizeof (* mem_tmp ), GFP_KERNEL );
895
880
if (!mem_tmp ) {
896
- err ("out of system memory\n" );
897
881
retval = - ENOMEM ;
898
882
goto error ;
899
883
}
@@ -924,7 +908,6 @@ static int configure_bridge(struct pci_func **func_passed, u8 slotno)
924
908
if (!bus ) {
925
909
bus = kzalloc (sizeof (* bus ), GFP_KERNEL );
926
910
if (!bus ) {
927
- err ("out of system memory\n" );
928
911
retval = - ENOMEM ;
929
912
goto error ;
930
913
}
@@ -1652,10 +1635,9 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
1652
1635
}
1653
1636
if (io ) {
1654
1637
io_range = kzalloc (sizeof (* io_range ), GFP_KERNEL );
1655
- if (!io_range ) {
1656
- err ("out of system memory\n" );
1638
+ if (!io_range )
1657
1639
return - ENOMEM ;
1658
- }
1640
+
1659
1641
io_range -> start = io -> start ;
1660
1642
io_range -> end = io -> end ;
1661
1643
io_range -> rangeno = 1 ;
@@ -1664,10 +1646,9 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
1664
1646
}
1665
1647
if (mem ) {
1666
1648
mem_range = kzalloc (sizeof (* mem_range ), GFP_KERNEL );
1667
- if (!mem_range ) {
1668
- err ("out of system memory\n" );
1649
+ if (!mem_range )
1669
1650
return - ENOMEM ;
1670
- }
1651
+
1671
1652
mem_range -> start = mem -> start ;
1672
1653
mem_range -> end = mem -> end ;
1673
1654
mem_range -> rangeno = 1 ;
@@ -1676,10 +1657,9 @@ static int add_new_bus(struct bus_node *bus, struct resource_node *io, struct re
1676
1657
}
1677
1658
if (pfmem ) {
1678
1659
pfmem_range = kzalloc (sizeof (* pfmem_range ), GFP_KERNEL );
1679
- if (!pfmem_range ) {
1680
- err ("out of system memory\n" );
1660
+ if (!pfmem_range )
1681
1661
return - ENOMEM ;
1682
- }
1662
+
1683
1663
pfmem_range -> start = pfmem -> start ;
1684
1664
pfmem_range -> end = pfmem -> end ;
1685
1665
pfmem_range -> rangeno = 1 ;
0 commit comments