Author: Vaishali Thakkar <vaishali.thakkar@oracle.com> 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 Reviewed-by: Eric Engestrom [fixed fmt string warning (s/%ld/%d/)] Signed-off-by: …