Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
d4accd60
Commit
d4accd60
authored
Nov 30, 2006
by
David S. Miller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SPARC]: Check kzalloc() return value in SUN4D irq/iommu init.
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
c80892d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/sun4d_irq.c
+4
-0
arch/sparc/mm/io-unit.c
arch/sparc/mm/io-unit.c
+5
-0
No files found.
arch/sparc/kernel/sun4d_irq.c
View file @
d4accd60
...
...
@@ -546,6 +546,10 @@ void __init sun4d_init_sbi_irq(void)
for_each_sbus
(
sbus
)
nsbi
++
;
sbus_actions
=
kzalloc
(
nsbi
*
8
*
4
*
sizeof
(
struct
sbus_action
),
GFP_ATOMIC
);
if
(
!
sbus_actions
)
{
prom_printf
(
"SUN4D: Cannot allocate sbus_actions, halting.
\n
"
);
prom_halt
();
}
for_each_sbus
(
sbus
)
{
#ifdef CONFIG_SMP
extern
unsigned
char
boot_cpu_id
;
...
...
arch/sparc/mm/io-unit.c
View file @
d4accd60
...
...
@@ -22,6 +22,7 @@
#include <asm/cacheflush.h>
#include <asm/tlbflush.h>
#include <asm/dma.h>
#include <asm/oplib.h>
/* #define IOUNIT_DEBUG */
#ifdef IOUNIT_DEBUG
...
...
@@ -42,6 +43,10 @@ iounit_init(int sbi_node, int io_node, struct sbus_bus *sbus)
struct
resource
r
;
iounit
=
kzalloc
(
sizeof
(
struct
iounit_struct
),
GFP_ATOMIC
);
if
(
!
iounit
)
{
prom_printf
(
"SUN4D: Cannot alloc iounit, halting.
\n
"
);
prom_halt
();
}
iounit
->
limit
[
0
]
=
IOUNIT_BMAP1_START
;
iounit
->
limit
[
1
]
=
IOUNIT_BMAP2_START
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment