drm/msm: Odd PTR_ERR usage
Subsystems (2)
PATCH 1/1 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 <[email protected]>
---
drivers/gpu/drm/msm/msm_drv.c +1 -1
@@ -199,7 +199,7 @@ static int msm_load(struct drm_device *d* 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; }
Quoted 6 lines · Thomas Meyer
The variable
priv->kmsis not initialized yet.Found by "
scripts/coccinelle/tests/odd_ptr_err.cocci".PTR_ERRshould access the value just tested byIS_ERR.Signed-off-by Thomas Meyer <[email protected]>
thanks, I've got it queued up
BR,
-R
Quoted 20 lines
---
diff -u -p
a/drivers/gpu/drm/msm/msm_drv.cb/drivers/gpu/drm/msm/msm_drv.cdrivers/gpu/drm/msm/msm_drv.c +1
-2@@ -199,7 +199,7 @@ static int msm_load(struct drm_device *d* 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; } --To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/