[PATCH] drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

2016-04-28 Thread Vaishali Thakkar
On Thursday 28 April 2016 06:23 PM, Eric Engestrom wrote: > On Wed, Apr 27, 2016 at 04:51:37PM +0530, Vaishali Thakkar wrote: >> Here, a location is reset to NULL before being passed to PTR_ERR. >> So, PTR_ERR should be called before its argument is reassigned >> to NULL. Further to simplify thin

[PATCH] drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

2016-04-28 Thread Eric Engestrom
On Wed, Apr 27, 2016 at 04:51:37PM +0530, Vaishali Thakkar wrote: > Here, a location is reset to NULL before being passed to PTR_ERR. > So, PTR_ERR should be called before its argument is reassigned > to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead > of PTR_ERR and IS_ERR. > > Prob

[PATCH] drm/msm: Move call to PTR_ERR_OR_ZERO after reassignment

2016-04-27 Thread Vaishali Thakkar
Here, a location is reset to NULL before being passed to PTR_ERR. So, PTR_ERR should be called before its argument is reassigned to NULL. Further to simplify things use PTR_ERR_OR_ZERO instead of PTR_ERR and IS_ERR. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar --- drivers/gpu