In some situations there is no need to restore the original return
address because all the related actions are performed inside the handler
(e.g. preload implementation)
Change-Id: I4d917cdd7201039002d56e7780a7c5701327c16d
Signed-off-by: Vasiliy Ulyanov <v.ulyanov@samsung.com>
}
spin_unlock_irqrestore(&uretprobe_lock, flags);
- arch_set_orig_ret_addr(orig_ret_addr, regs);
+ /* orig_ret_addr is NULL when there is no need to restore anything
+ * (all the magic is performed inside handler) */
+ if (likely(orig_ret_addr))
+ arch_set_orig_ret_addr(orig_ret_addr, regs);
return 1;
}