interconnect: Fix undersized devress_alloc allocation
authorColin Ian King <colin.king@canonical.com>
Fri, 30 Jul 2021 07:54:08 +0000 (08:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Aug 2021 11:22:18 +0000 (13:22 +0200)
commit1a084e78217dcce8bef262980e0659ce52eed5c5
tree35dcf9c808a7b50bd72c83cc7866b2621015fa46
parentdcc23e58511b75d53cc05c2979a2e00ad30e5885
interconnect: Fix undersized devress_alloc allocation

commit 85b1ebfea2b0d8797266bcc6f04b6cc87e38290a upstream.

The expression sizeof(**ptr) for the void **ptr is just 1 rather than
the size of a pointer. Fix this by using sizeof(*ptr).

Addresses-Coverity: ("Wrong sizeof argument")
Fixes: e145d9a184f2 ("interconnect: Add devm_of_icc_get() as exported API for users")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210730075408.19945-1-colin.king@canonical.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/interconnect/core.c