[PATCH] drm/dsi: Do the 'msg' check prior to dereferencing it.

Thierry Reding treding at nvidia.com
Wed Dec 17 02:59:21 PST 2014


On Tue, Dec 16, 2014 at 10:04:34PM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Commit a52879e8d7cb ("drm/dsi: Add message to packet translator") caused the
> following Smatch complaint:
> 
> drivers/gpu/drm/drm_mipi_dsi.c:328 mipi_dsi_create_packet()
>          warn: variable dereferenced before check 'msg' (see line 326)
> 
> Do the 'msg' check prior to dereferencing it.
> 
> Reported-by: Dan Carpenter <dan.carpenter at oracle.com> 
> Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> ---
>  drivers/gpu/drm/drm_mipi_dsi.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

I've had an equivalent patch in the drm/panel tree for almost two weeks
but had forgotten to push. Pushed now.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20141217/882e2e69/attachment.sig>


More information about the dri-devel mailing list