commit | ab1ba5268cd13da04c28546559dc4473e9d9603a | [log] [tgz] |
---|---|---|
author | Richard Spiegel <richard.spiegel@amd.corp-partner.google.com> | Mon Aug 20 16:59:02 2018 -0700 |
committer | chrome-bot <chrome-bot@chromium.org> | Wed Aug 29 16:08:37 2018 -0700 |
tree | b5776aaa9509bf3f40ec33afcf81089c533d3834 | |
parent | 1558526f3761d0f32ce5f1b0f28764bd0b65ee1b [diff] |
UPSTREAM: lib/gpio.c: Validate num_gpio In function _gpio_base3_value(), if num_gpio is 0 it'll cause the return of an undefined value, as no for loop will be executed. Assert that it's not 0. BUG=b:112253891 TEST=Build and boot grunt. Change-Id: I5f753b093053977be36a60c2d6e6a48c27a989fb Signed-off-by: Martin Roth <martinroth@chromium.org> Original-Commit-Id: 4cafc886195a52a0610c46c79fbb700294e9f1aa Original-Change-Id: I2b6537900fa41ebbee0171959f3ce236d360bc80 Original-Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com> Original-Reviewed-on: https://review.coreboot.org/28249 Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Original-Reviewed-by: Martin Roth <martinroth@google.com> Reviewed-on: https://chromium-review.googlesource.com/1195564