Skip to contentSkip to conversation

drm/dsi: Add message to packet translator

DISCUSSION Dan Carpenter 2 participants 2 messages Dec 16, 2014 – Dec 17, 2014

lore
Share & tools
lore
#0 lore raw

Hello Thierry Reding,

This is a semi-automatic email about new static checker warnings.

The patch a52879e8d7cb: "drm/dsi: Add message to packet translator" from Oct 16, 2014, leads to 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)

drivers/gpu/drm/drm_mipi_dsi.c
325 {

   326		const u8 *tx = msg->tx_buf;
                               ^^^^^^^^^^^

Dereference.

327
328 if (!packet || !msg)

                               ^^^^

Check.

329 return -EINVAL;
330

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw
Quoted 19 lines · Dan Carpenter

Hello Thierry Reding,

This is a semi-automatic email about new static checker warnings.

The patch a52879e8d7cb: "drm/dsi: Add message to packet translator" from Oct 16, 2014, leads to 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)

drivers/gpu/drm/drm_mipi_dsi.c

   325	{
   326		const u8 *tx = msg->tx_buf;
                               ^^^^^^^^^^^

Dereference.

   327	
   328		if (!packet || !msg)
                               ^^^^
Quoted 7 lines

Check.

   329			return -EINVAL;
   330	

regards,
dan carpenter

I've had a patch in my tree for almost two weeks now, I wonder why this is still there...

Ah, forgot to push it of course. Done now.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel