sh: handle early calls to return_address() when using dwarf unwinder.
[safe/jmp/linux-2.6] / arch / sh / kernel / return_address.c
index cbf1dd5..5124aeb 100644 (file)
@@ -24,6 +24,8 @@ void *return_address(unsigned int depth)
                struct dwarf_frame *tmp;
 
                tmp = dwarf_unwind_stack(ra, frame);
+               if (!tmp)
+                       return NULL;
 
                if (frame)
                        dwarf_free_frame(frame);