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:
When IWineD3DDevice_GetDepthStencilSurface returns WINED3DERR_NOTFOUND it was setting ppZStencilSurface to null. This was the cause of rendering issues with the 3d models in spore.