diff options
author | Thomas Meyer <thomas@m3y3r.de> | 2013-09-17 01:19:54 +0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2013-09-28 16:53:26 +0400 |
commit | e4826a94c7444698725572f3def3686fb3f38d6d (patch) | |
tree | 7903f17c51bee18040afd3a382683c7325a4f2f0 /drivers | |
parent | d8524ae9d6f492a9c6db9f4d89c5f9b8782fa2d5 (diff) | |
download | linux-e4826a94c7444698725572f3def3686fb3f38d6d.tar.xz |
drm/msm: Odd PTR_ERR usage
The variable priv->kms is not initialized yet.
Found by "scripts/coccinelle/tests/odd_ptr_err.cocci".
PTR_ERR should access the value just tested by IS_ERR.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 008d772384c7..fe03f9c26092 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -199,7 +199,7 @@ static int msm_load(struct drm_device *dev, unsigned long flags) * imx drm driver on iMX5 */ dev_err(dev->dev, "failed to load kms\n"); - ret = PTR_ERR(priv->kms); + ret = PTR_ERR(kms); goto fail; } |