* re: [media] cx23885-dvb: Remove a dirty hack that would require DVBv3
@ 2012-01-04 6:45 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-01-04 6:45 UTC (permalink / raw)
To: mchehab; +Cc: linux-media
Hello Mauro Carvalho Chehab,
This is a semi-automatic email about new static checker warnings.
The patch a7d44baaed0a: "[media] cx23885-dvb: Remove a dirty hack
that would require DVBv3" from Dec 26, 2011, leads to the following
Smatch complaint:
drivers/media/video/cx23885/cx23885-dvb.c +135 cx23885_dvb_gate_ctrl()
error: we previously assumed 'fe' could be null (see line 128)
drivers/media/video/cx23885/cx23885-dvb.c
127
128 if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
^^
Old condition.
129 fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open);
130
131 /*
132 * FIXME: Improve this path to avoid calling the
133 * cx23885_dvb_set_frontend() every time it passes here.
134 */
135 cx23885_dvb_set_frontend(fe->dvb.frontend);
^^^^
New dereference.
136 }
137
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
* re: [media] cx23885-dvb: Remove a dirty hack that would require DVBv3
@ 2012-05-15 8:48 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-05-15 8:48 UTC (permalink / raw)
To: linux-media
Hi, I'm working some new Smatch stuff and sending bug reports for old
code. -Dan
---
This is a semi-automatic email about new static checker warnings.
The patch a7d44baaed0a: "[media] cx23885-dvb: Remove a dirty hack
that would require DVBv3" from Dec 26, 2011, leads to the following
Smatch complaint:
drivers/media/video/cx23885/cx23885-dvb.c:137 cx23885_dvb_gate_ctrl()
error: we previously assumed 'fe->dvb.frontend' could be null (see line 130)
drivers/media/video/cx23885/cx23885-dvb.c
129
130 if (fe && fe->dvb.frontend && fe->dvb.frontend->ops.i2c_gate_ctrl)
^^^^^^^^^^^^^^^^^^^^^^
Old check.
131 fe->dvb.frontend->ops.i2c_gate_ctrl(fe->dvb.frontend, open);
132
133 /*
134 * FIXME: Improve this path to avoid calling the
135 * cx23885_dvb_set_frontend() every time it passes here.
136 */
137 cx23885_dvb_set_frontend(fe->dvb.frontend);
^^^^^^^^^^^^^^^^
New call to cx23885_dvb_set_frontend(). If "fe->dvb.frontend" is NULL
then we will oops in cx23885_dvb_set_frontend(). Also if "fe" is NULL
we'll oops right here.
138 }
139
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-15 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 8:48 [media] cx23885-dvb: Remove a dirty hack that would require DVBv3 Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2012-01-04 6:45 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).