From e12892070184ee782c207f09722a93d0236be955 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Mon, 19 May 2014 15:13:45 +0800 Subject: [PATCH] regmap: irq: Fix possible ZERO_SIZE_PTR pointer dereferencing error. Since we cannot make sure the 'chip->num_regs' will always be none zero from the users, and then if 'chip->num_regs' equals to zero by mistake or other reasons, the kzalloc() will return ZERO_SIZE_PTR, which equals to ((void *)16). So this patch fix this with just checking the 'chip->num_regs' before calling kzalloc(). This also sorts the header files in alphabetical order at the same time. Signed-off-by: Xiubo Li Signed-off-by: Mark Brown --- Reading git-format-patch failed