On Tue, Jul 02, 2013 at 09:53:28AM +0900, Seung-Woo Kim wrote:
From: YoungJun Cho yj44.cho@samsung.com
There are missing parts to handle error in drm_open_helper(). The priv->minor, assigned by idr_find() which can return NULL, should be checked whether it is NULL or not before referencing it. put_pid(), drm_gem_release(), and drm_prime_destory_file_private() should be called when error happens after their pair functions are called. If an error occurs after executing dev->driver->open() which allocates driver specific per-file private data, then the private data should be released.
Signed-off-by: YoungJun Cho yj44.cho@samsung.com Signed-off-by: Seung-Woo Kim sw0312.kim@samsung.com Signed-off-by: Kyungmin Park kyungmin.park@samsung.com
I can't see anything else that we setup and miss freeing along the failed open, so if it compiles ;-) Reviewed-by: Chris Wilson <chris-wilson.co.uk> -Chris