fix some use before NULL check
parent
4436ab86d8
commit
ef835973b2
|
@ -2123,7 +2123,7 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
|
||||||
DRM_DEVICE;
|
DRM_DEVICE;
|
||||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||||
drm_file_t *filp_priv;
|
drm_file_t *filp_priv;
|
||||||
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
drm_radeon_sarea_t *sarea_priv;
|
||||||
drm_device_dma_t *dma = dev->dma;
|
drm_device_dma_t *dma = dev->dma;
|
||||||
drm_buf_t *buf;
|
drm_buf_t *buf;
|
||||||
drm_radeon_vertex_t vertex;
|
drm_radeon_vertex_t vertex;
|
||||||
|
@ -2136,6 +2136,8 @@ static int radeon_cp_vertex(DRM_IOCTL_ARGS)
|
||||||
return DRM_ERR(EINVAL);
|
return DRM_ERR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sarea_priv = dev_priv->sarea_priv;
|
||||||
|
|
||||||
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
||||||
|
|
||||||
DRM_COPY_FROM_USER_IOCTL(vertex, (drm_radeon_vertex_t __user *) data,
|
DRM_COPY_FROM_USER_IOCTL(vertex, (drm_radeon_vertex_t __user *) data,
|
||||||
|
@ -2211,7 +2213,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
|
||||||
DRM_DEVICE;
|
DRM_DEVICE;
|
||||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||||
drm_file_t *filp_priv;
|
drm_file_t *filp_priv;
|
||||||
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
drm_radeon_sarea_t *sarea_priv;
|
||||||
drm_device_dma_t *dma = dev->dma;
|
drm_device_dma_t *dma = dev->dma;
|
||||||
drm_buf_t *buf;
|
drm_buf_t *buf;
|
||||||
drm_radeon_indices_t elts;
|
drm_radeon_indices_t elts;
|
||||||
|
@ -2224,6 +2226,7 @@ static int radeon_cp_indices(DRM_IOCTL_ARGS)
|
||||||
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
DRM_ERROR("%s called with no initialization\n", __FUNCTION__);
|
||||||
return DRM_ERR(EINVAL);
|
return DRM_ERR(EINVAL);
|
||||||
}
|
}
|
||||||
|
sarea_priv = dev_priv->sarea_priv;
|
||||||
|
|
||||||
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
||||||
|
|
||||||
|
@ -2439,7 +2442,7 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
|
||||||
DRM_DEVICE;
|
DRM_DEVICE;
|
||||||
drm_radeon_private_t *dev_priv = dev->dev_private;
|
drm_radeon_private_t *dev_priv = dev->dev_private;
|
||||||
drm_file_t *filp_priv;
|
drm_file_t *filp_priv;
|
||||||
drm_radeon_sarea_t *sarea_priv = dev_priv->sarea_priv;
|
drm_radeon_sarea_t *sarea_priv;
|
||||||
drm_device_dma_t *dma = dev->dma;
|
drm_device_dma_t *dma = dev->dma;
|
||||||
drm_buf_t *buf;
|
drm_buf_t *buf;
|
||||||
drm_radeon_vertex2_t vertex;
|
drm_radeon_vertex2_t vertex;
|
||||||
|
@ -2453,6 +2456,8 @@ static int radeon_cp_vertex2(DRM_IOCTL_ARGS)
|
||||||
return DRM_ERR(EINVAL);
|
return DRM_ERR(EINVAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sarea_priv = dev_priv->sarea_priv;
|
||||||
|
|
||||||
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
DRM_GET_PRIV_WITH_RETURN(filp_priv, filp);
|
||||||
|
|
||||||
DRM_COPY_FROM_USER_IOCTL(vertex, (drm_radeon_vertex2_t __user *) data,
|
DRM_COPY_FROM_USER_IOCTL(vertex, (drm_radeon_vertex2_t __user *) data,
|
||||||
|
|
Loading…
Reference in New Issue