Removed duplicate declaration of tmp in kernel