Commits


kokke authored and Andy Green committed 2850de1afad
drivers: spi: avoid leaking uninitialized bits Before this commit, line 84 read 'u' before it had a value, on 1st for-loop iteration. See comment on line 84 below: 82 for (n = 0; n < 8; n++) { 83 ctx->gpio->set(ctx->clk, inv); 84 u = (u << 1) | !!ctx->gpio->read(ctx->miso); /* <-- u is used uninitialized here */ 85 ctx->gpio->set(ctx->mosi, !!(u & 0x80)); 86 ctx->gpio->set(ctx->clk, !inv); 87 }