]> git.karo-electronics.de Git - linux-beck.git/commitdiff
PM / devfreq: exynos-ppmu: ppmu_events array should not be NULL terminated
authorAxel Lin <axel.lin@ingics.com>
Fri, 21 Oct 2016 01:09:08 +0000 (09:09 +0800)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 17 Nov 2016 02:31:28 +0000 (11:31 +0900)
The rest of the code uses ARRAY_SIZE to count the number of entries in
ppmu_events array. The NULL terminated entry makes ARRAY_SIZE return
off-by-one value.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
drivers/devfreq/event/exynos-ppmu.c

index a112034997eb683bb946faea80c799f7337738df..958285d5d64b4879590e5f690f5861abe03f3b86 100644 (file)
@@ -90,8 +90,6 @@ struct __exynos_ppmu_events {
        PPMU_EVENT(d1-cpu),
        PPMU_EVENT(d1-general),
        PPMU_EVENT(d1-rt),
-
-       { /* sentinel */ },
 };
 
 static int exynos_ppmu_find_ppmu_id(struct devfreq_event_dev *edev)