drm/ttm: Fix buffer object metadata accounting regression v2
drm/ttm: Fix buffer object metadata accounting regression v2

A regression was introduced in the 3.3 rc series, commit
"drm/ttm: simplify memory accounting for ttm user v2",
causing the metadata of buffer objects created using the ttm_bo_create()
function to be accounted twice.
That causes massive leaks with the vmwgfx driver running for example
SpecViewperf Catia-03 test 2, eventually killing the app.

Furthermore, the same commit introduces a regression where
metadata accounting is leaked if a buffer object is
initialized with an illegal size. This is also fixed with this commit.

v2: Fixed an error path and removed an unused variable.

Signed-off-by: Thomas Hellstrom <a26490dfbee4be3d38287ad6448444504f58193c@vmware.com>
Reviewed-by: Konrad Rzeszutek Wilk <da3a51b335cef0eb0e2c329c5ef6bcd6acef687a@oracle.com>
Cc: Jerome Glisse <0620d428a1bd3756b1319066bf466b3b8be0b2b2@redhat.com>
Cc: 4fbacc2fa0ffdbb11bf1ad6925b886ebd08dd15f@vger.kernel.org
Signed-off-by: Dave Airlie <f2295d84e358395675bc8031be58672073ae065e@redhat.com>

TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs