remove twice check of platform

no need to check the platform twice
just exit if the platform is not linux