]> git.baikalelectronics.ru Git - kernel.git/commit
of/irq: Avoid calling list_first_entry() for empty list
authorAxel Lin <axel.lin@ingics.com>
Sun, 23 Jun 2013 07:50:07 +0000 (15:50 +0800)
committerGrant Likely <grant.likely@linaro.org>
Mon, 22 Jul 2013 18:40:38 +0000 (19:40 +0100)
commite9072c8f5912a7ccca52a5e13242bf906d501066
treea50fe3d27f2bcb9aa00e2c2b6e6c428e1c86618c
parentb9c51538513768da52b043e82f787faa24a67f4b
of/irq: Avoid calling list_first_entry() for empty list

list_first_entry() expects the list is not empty, we need to check if list is
empty before calling list_first_entry(). Thus use list_first_entry_or_null()
instead of list_first_entry().

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/of/irq.c