Any reason this isn't tested? I don't know about this function in particular, but there have been games that were confused by NOT clearing output to NULL on error (not in GetDepthStencilSurface though).
Also regardless of setting or not-setting to NULL, the warning may have its uses when reading +d3d log in the process of debugging something.
Andrew Fenn wrote: