[COMMON] media: scaler: fix buffer free during working
Scaler driver is able to run H/W twice to support the users who want
to zoom out the given image by the larger minification factor than the
factor H/W supports. It is called pre-scaling and pre-scaling requires
a temporary buffer that is not supplied by the users but allocaged by
Scaler driver itself.
Scaler driver allocates the buffer when it finds that pre-scaling is
required and frees when it notices that the pre-scaling is not needed
any more. However the driver has a flaw of logic in sc_release() that
releases the temporary buffer before waiting for the H/W to be done.
It results in accessing a freed buffer by H/W.
Change-Id: I951de839884382b9806a744aac92ec4d083fa689
Signed-off-by: Cho KyongHo <pullip.cho@samsung.com>