]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/a4xx: fix error handling in a4xx_gpu_init()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 1 Oct 2021 12:57:59 +0000 (15:57 +0300)
committerRob Clark <robdclark@chromium.org>
Tue, 12 Oct 2021 00:30:53 +0000 (17:30 -0700)
commit5d40071c561ef3bce4c1b427da1c218bf9dd2e78
tree09b682f8256a37f1cb90faa478c520ba1687bdc1
parent4c3c8fd2aa37306798cc936ac86e42e483ff6227
drm/msm/a4xx: fix error handling in a4xx_gpu_init()

This code returns 1 on error instead of a negative error.  It leads to
an Oops in the caller.  A second problem is that the check for
"if (ret != -ENODATA)" cannot be true because "ret" is set to 1.

Fixes: 127c138e469f ("drm/msm: Fix duplicate gpu node in icc summary")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20211001125759.GJ2283@kili
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a4xx_gpu.c