I've never shot a deer with a .40 S&W, but I've killed a few coyotes and 2 javalinas with the cartridge.
The coyotes, so far, died on the spot. One javalina died in three jumps, the other about the same, but I did shoot it again in those three jumps...
Might have had something to do with the fact that it almost rolled into me, then jumped up and tried to run around me, so I shot it again at point blank range. It was dead, but didn't know it yet.
Oh, and though javalinas and coyotes are significantly smaller than deer, I've yet to have a bullet not exit.