mfd: pm8921: Potential NULL dereference in pm8921_remove()
commit d6daef95 upstream. We assume that "pmic" could be NULL and then dereference it two lines later. I fix this by moving the dereference inside the NULL check. Fixes: c013f0a5 ('mfd: Add pm8xxx irq support') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Showing
Please register or sign in to comment