]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Oct 2021 09:57:57 +0000 (11:57 +0200)
commit3962d626eb3e3b23ebb2e2a61537fa764acbfe11
treec79ac341bce1f8d61d091784873374ab6b7b037e
parent20cfa89cd7e1274268b23306a73fa496b6fe83cf
drm/msm/a4xx: fix error handling in a4xx_gpu_init()

commit 980d74e7d03ccf2eaa11d133416946bd880c7c08 upstream.

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: 5785dd7a8ef0 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/msm/adreno/a4xx_gpu.c