File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -85,19 +85,13 @@ void __init poking_init(void)
85
85
static int map_patch_area (void * addr , unsigned long text_poke_addr )
86
86
{
87
87
unsigned long pfn ;
88
- int err ;
89
88
90
89
if (is_vmalloc_or_module_addr (addr ))
91
90
pfn = vmalloc_to_pfn (addr );
92
91
else
93
92
pfn = __pa_symbol (addr ) >> PAGE_SHIFT ;
94
93
95
- err = map_kernel_page (text_poke_addr , (pfn << PAGE_SHIFT ), PAGE_KERNEL );
96
-
97
- if (err )
98
- return -1 ;
99
-
100
- return 0 ;
94
+ return map_kernel_page (text_poke_addr , (pfn << PAGE_SHIFT ), PAGE_KERNEL );
101
95
}
102
96
103
97
static inline int unmap_patch_area (unsigned long addr )
@@ -156,10 +150,9 @@ static int do_patch_instruction(u32 *addr, ppc_inst_t instr)
156
150
local_irq_save (flags );
157
151
158
152
text_poke_addr = (unsigned long )__this_cpu_read (text_poke_area )-> addr ;
159
- if ( map_patch_area (addr , text_poke_addr )) {
160
- err = -1 ;
153
+ err = map_patch_area (addr , text_poke_addr );
154
+ if ( err )
161
155
goto out ;
162
- }
163
156
164
157
patch_addr = (u32 * )(text_poke_addr + (kaddr & ~PAGE_MASK ));
165
158
You can’t perform that action at this time.
0 commit comments