soc: samsung: chipid: Fix memory leak in error path
Currently when the call to product_id_to_soc_id fails there is a memory leak of soc_dev_attr->revision and soc_dev_attr on the error return path. Fix this by adding a common error return path that frees there obects and use this for two error return paths. Addresses-Coverity: ("Resource leak") Fixes: 3253b7b7 ("soc: samsung: Add exynos chipid driver support") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NKrzysztof Kozlowski <krzk@kernel.org>
Showing
想要评论请 注册 或 登录