memory: emif: check the pointer temp in get_device_details()
authorJia-Ju Bai <baijiaju1990@gmail.com>
Fri, 25 Feb 2022 13:25:52 +0000 (05:25 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:40:09 +0000 (14:40 +0200)
commit64eee4127c23e29f2645139a3a6564ae4607c2e6
tree24d7ec2430e18138539b43538b87c8a2dd849242
parent330a9b0d38e6609dc1cfe52f0b5a24c9ea71db9a
memory: emif: check the pointer temp in get_device_details()

[ Upstream commit 5b5ab1bfa1898c6d52936a57c25c5ceba2cb2f87 ]

The pointer temp is allocated by devm_kzalloc(), so it should be
checked for error handling.

Fixes: 7ec944538dde ("memory: emif: add basic infrastructure for EMIF driver")
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225132552.27894-1-baijiaju1990@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/memory/emif.c