If the creature you control is an illegal target as Joust tries to resolve, no creature gets +2/+1. If that creature is a legal target but the creature you don't control isn't, it still gets +2/+1 until end of turn if it's a Knight.