Skip to content

Commit

Permalink
crypto: s5p-sss - fix AES support for Exynos5433
Browse files Browse the repository at this point in the history
Commit 0918f18 ("crypto: s5p - add AES support for Exynos5433")
introduced bug in dereferencing clk_names[1] on platforms different from
Exynos5433. On Exynos board XU3 call trace is:

"Unable to handle kernel paging request at virtual address 00004000"
(strcmp) from [<c0774014>] (of_property_match_string+0x58/0xd0)
...
(devm_clk_get) from [<c075c248>] (s5p_aes_probe+0xd4/0x4a0)
(s5p_aes_probe) from [<c059dbc4>] (platform_drv_probe+0x6c/0xa4)

Fix this by setting array clk_names size to 2.

Fixes: 0918f18 ("crypto: s5p - add AES support for Exynos5433")
Reported-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Kamil Konieczny <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Tested-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
  • Loading branch information
Kamil Konieczny authored and herbertx committed Mar 7, 2019
1 parent 0918f18 commit aa1abbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/crypto/s5p-sss.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@
struct samsung_aes_variant {
unsigned int aes_offset;
unsigned int hash_offset;
const char *clk_names[];
const char *clk_names[2];
};

struct s5p_aes_reqctx {
Expand Down

0 comments on commit aa1abbe

Please sign in to comment.