I have been making a code scanner for a while, and I wanted to test
a new rule, so I scanned sys/pci/drm. It found an uninitialized
variable in intel_ddi.c.
Quite simple, if !(val & DDI_BUF_CTL_ENABLE) at l.1420, the variable
'wait' is not initialized at l.1432.
I guess I should send it upstream, but, you know, I don't want to
subscribe to the ML only to send one small mail. Is there someone here
who's upstream or who's willing to send that patch?
Thanks
Index: intel_ddi.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/i915/intel_ddi.c,v
retrieving revision 1.1
diff -u -r1.1 intel_ddi.c
--- intel_ddi.c 18 Mar 2013 12:36:52 -0000 1.1
+++ intel_ddi.c 5 May 2013 10:56:40 -0000
@@ -1412,7 +1412,7 @@
struct intel_dp *intel_dp = &intel_dig_port->dp;
struct inteldrm_softc *dev_priv = encoder->dev->dev_private;
enum port port = intel_dig_port->port;
- bool wait;
+ bool wait = false;
uint32_t val;
if (I915_READ(DP_TP_CTL(port)) & DP_TP_CTL_ENABLE) {