[coreboot] New Defects reported by Coverity Scan for coreboot

scan-admin at coverity.com scan-admin at coverity.com
Fri Jun 9 14:25:41 CEST 2017


Hi,

Please find the latest report on new defect(s) introduced to coreboot found with Coverity Scan.

2 new defect(s) introduced to coreboot found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1375986:    (NEGATIVE_RETURNS)
/src/mainboard/google/link/i915.c: 281 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 287 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 291 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 297 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 304 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 310 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 315 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 318 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 324 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 329 in i915lightup_sandy()
/src/mainboard/google/link/i915.c: 332 in i915lightup_sandy()


________________________________________________________________________________________________________
*** CID 1375986:    (NEGATIVE_RETURNS)
/src/mainboard/google/link/i915.c: 281 in i915lightup_sandy()
275     	vsync = (mode->va + mode->vso - 1) |
276     		((mode->va + mode->vso + mode->vspw - 1) << 16);
277     	printk(BIOS_SPEW, "I915_WRITE(VSYNC(pipe),0x%08x)\n", vsync);
278     
279     	printk(BIOS_SPEW, "Table has %d elements\n", niodefs);
280     
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
281     	index = run(0);
282     	printk(BIOS_SPEW, "Run returns %d\n", index);
283     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_DPCD_REV << 8|0xe;
284     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 14);
285     	auxout[0] = 0 << 31 /* i2c */|1 << 30|0x0 << 28/*W*/|0x0 << 8|0x0;
286     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 3, auxin, 0);
/src/mainboard/google/link/i915.c: 287 in i915lightup_sandy()
281     	index = run(0);
282     	printk(BIOS_SPEW, "Run returns %d\n", index);
283     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_DPCD_REV << 8|0xe;
284     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 14);
285     	auxout[0] = 0 << 31 /* i2c */|1 << 30|0x0 << 28/*W*/|0x0 << 8|0x0;
286     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 3, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
287     	index = run(index);
288     	printk(BIOS_SPEW, "Run returns %d\n", index);
289     	auxout[0] = 0 << 31 /* i2c */|0 << 30|0x0 << 28/*W*/|0x0 << 8|0x0;
290     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 3, auxin, 0);
291     	index = run(index);
292     	printk(BIOS_SPEW, "Run returns %d\n", index);
/src/mainboard/google/link/i915.c: 291 in i915lightup_sandy()
285     	auxout[0] = 0 << 31 /* i2c */|1 << 30|0x0 << 28/*W*/|0x0 << 8|0x0;
286     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 3, auxin, 0);
287     	index = run(index);
288     	printk(BIOS_SPEW, "Run returns %d\n", index);
289     	auxout[0] = 0 << 31 /* i2c */|0 << 30|0x0 << 28/*W*/|0x0 << 8|0x0;
290     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 3, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
291     	index = run(index);
292     	printk(BIOS_SPEW, "Run returns %d\n", index);
293     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_SET_POWER << 8|0x0;
294     	auxout[1] = 0x01000000;
295     	/* DP_SET_POWER_D0 | DP_PSR_SINK_INACTIVE */
296     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
/src/mainboard/google/link/i915.c: 297 in i915lightup_sandy()
291     	index = run(index);
292     	printk(BIOS_SPEW, "Run returns %d\n", index);
293     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_SET_POWER << 8|0x0;
294     	auxout[1] = 0x01000000;
295     	/* DP_SET_POWER_D0 | DP_PSR_SINK_INACTIVE */
296     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
297     	index = run(index);
298     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_LINK_BW_SET << 8|0x8;
299     	auxout[1] = 0x0a840000;
300     	/*( DP_LINK_BW_2_7 &0xa)|0x0000840a*/
301     	auxout[2] = 0x00000000;
302     	auxout[3] = 0x01000000;
/src/mainboard/google/link/i915.c: 304 in i915lightup_sandy()
298     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_LINK_BW_SET << 8|0x8;
299     	auxout[1] = 0x0a840000;
300     	/*( DP_LINK_BW_2_7 &0xa)|0x0000840a*/
301     	auxout[2] = 0x00000000;
302     	auxout[3] = 0x01000000;
303     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 13, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
304     	index = run(index);
305     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
306     	auxout[1] = 0x21000000;
307     	/* DP_TRAINING_PATTERN_1 | DP_LINK_SCRAMBLING_DISABLE |
308     	 * 	DP_SYMBOL_ERROR_COUNT_BOTH |0x00000021*/
309     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
/src/mainboard/google/link/i915.c: 310 in i915lightup_sandy()
304     	index = run(index);
305     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
306     	auxout[1] = 0x21000000;
307     	/* DP_TRAINING_PATTERN_1 | DP_LINK_SCRAMBLING_DISABLE |
308     	 * 	DP_SYMBOL_ERROR_COUNT_BOTH |0x00000021*/
309     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
310     	index = run(index);
311     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_LANE0_SET << 8|0x3;
312     	auxout[1] = 0x00000000;
313     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
314     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
315     	index = run(index);
/src/mainboard/google/link/i915.c: 315 in i915lightup_sandy()
309     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
310     	index = run(index);
311     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_LANE0_SET << 8|0x3;
312     	auxout[1] = 0x00000000;
313     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
314     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
315     	index = run(index);
316     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_LANE0_1_STATUS << 8|0x5;
317     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 5);
318     	index = run(index);
319     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
320     	auxout[1] = 0x22000000;
/src/mainboard/google/link/i915.c: 318 in i915lightup_sandy()
312     	auxout[1] = 0x00000000;
313     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
314     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
315     	index = run(index);
316     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_LANE0_1_STATUS << 8|0x5;
317     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 5);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
318     	index = run(index);
319     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
320     	auxout[1] = 0x22000000;
321     	/* DP_TRAINING_PATTERN_2 | DP_LINK_SCRAMBLING_DISABLE |
322     	 * 	DP_SYMBOL_ERROR_COUNT_BOTH |0x00000022*/
323     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
/src/mainboard/google/link/i915.c: 324 in i915lightup_sandy()
318     	index = run(index);
319     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
320     	auxout[1] = 0x22000000;
321     	/* DP_TRAINING_PATTERN_2 | DP_LINK_SCRAMBLING_DISABLE |
322     	 * 	DP_SYMBOL_ERROR_COUNT_BOTH |0x00000022*/
323     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
324     	index = run(index);
325     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_LANE0_SET << 8|0x3;
326     	auxout[1] = 0x00000000;
327     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
328     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
329     	index = run(index);
/src/mainboard/google/link/i915.c: 329 in i915lightup_sandy()
323     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);
324     	index = run(index);
325     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_LANE0_SET << 8|0x3;
326     	auxout[1] = 0x00000000;
327     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
328     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
329     	index = run(index);
330     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_LANE0_1_STATUS << 8|0x5;
331     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 5);
332     	index = run(index);
333     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
334     	auxout[1] = 0x00000000;
/src/mainboard/google/link/i915.c: 332 in i915lightup_sandy()
326     	auxout[1] = 0x00000000;
327     	/* DP_TRAIN_VOLTAGE_SWING_400 | DP_TRAIN_PRE_EMPHASIS_0 |0x00000000*/
328     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 8, auxin, 0);
329     	index = run(index);
330     	auxout[0] = 1 << 31 /* dp */|0x1 << 28/*R*/|DP_LANE0_1_STATUS << 8|0x5;
331     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 4, auxin, 5);
>>>     CID 1375986:    (NEGATIVE_RETURNS)
>>>     Assigning: signed variable "index" = "run".
332     	index = run(index);
333     	auxout[0] = 1 << 31 /* dp */|0x0 << 28/*W*/|DP_TRAINING_PATTERN_SET << 8|0x0;
334     	auxout[1] = 0x00000000;
335     	/* DP_TRAINING_PATTERN_DISABLE | DP_LINK_QUAL_PATTERN_DISABLE |
336     	 * 	DP_SYMBOL_ERROR_COUNT_BOTH |0x00000000*/
337     	intel_dp_aux_ch(DPA_AUX_CH_CTL, DPA_AUX_CH_DATA1, auxout, 5, auxin, 0);

** CID 1375985:  Null pointer dereferences  (FORWARD_NULL)
/src/mainboard/google/link/i915.c: 179 in run()


________________________________________________________________________________________________________
*** CID 1375985:  Null pointer dereferences  (FORWARD_NULL)
/src/mainboard/google/link/i915.c: 179 in run()
173     			break;
174     		case R:
175     			u = READ32(id->addr);
176     			if (verbose & vio)
177     				printk(BIOS_SPEW, "\texpect %08lx\n", id->data);
178     			/* we're looking for something. */
>>>     CID 1375985:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "lastidread".
179     			if (lastidread->addr == id->addr){
180     				/* they're going to be polling.
181     				 * just do it 1000 times
182     				 */
183     				for (t = 0; t < 1000 && id->data != u; t++){
184     					u = READ32(id->addr);


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbLuoVetFLSjdonCi1EjfHRqWGQvojmmkYaBE-2BPJiTQvQ-3D-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5aRW-2BnZA5iNs0fvSb-2F-2BfgeUNNRnhuvw-2Ft5UHnzu1nU47iRNntd-2BezcI4W6WvMG5L1tHpvPNn-2FnLK3W8-2BeztPjDzXPyioVhrdyLobJweIT1lbMVaHGIiE38wbcnSh3r071VxT8csEMDwfIq5Zfw8CfXH-2BzNps6SGfixkI3eJVcMbaxjwWdA2FROtMa2eax9tFTM-3D

To manage Coverity Scan email notifications for "coreboot at coreboot.org", click https://u2389337.ct.sendgrid.net/wf/click?upn=08onrYu34A-2BWcWUl-2F-2BfV0V05UPxvVjWch-2Bd2MGckcRbVDbis712qZDP-2FA8y06Nq4e-2BpBzwOa5gzBZa9dWpDbzfofODnVj1enK2UkK0-2BgCCqyeem8IVKvTxSaOFkteZFcnohwvb2rnYNjswGryEWCURnUk6WHU42sbOmtOjD-2Bx5c-3D_q4bX76XMySz3BXBlWr5fXXJ4cvAsgEXEqC7dBPM7O5aRW-2BnZA5iNs0fvSb-2F-2BfgeUIdXF1SYpn8L4vZcIxtevG9OQJuwT0E-2BBYsrXkaDhyHIMDmMtAcHsyyoidxWdzXeyuCnFgB45KsbHA0Gj3-2FOKTl1fd-2FvA1nB17J2pcL4nHQH2vc4-2FxdN9B907nRAMa6zJ9EJuNnDfj9MImajTQV71HXo5V6hfNdsTcXyH-2F5F-2FTEA-3D




More information about the coreboot mailing list