Added check to only detach kernel driver in LighpackDevice when it is active in the first place