Messages in this thread | | | From | Doug Anderson <> | Date | Tue, 28 Apr 2020 16:02:43 -0700 | Subject | Re: [PATCH] platform: chrome: Allocate sensorhub resource before claiming sensors |
| |
Hi,
On Mon, Apr 27, 2020 at 3:59 PM Gwendal Grignou <gwendal@chromium.org> wrote: > > Allocate callbacks array before enumerating the sensors: > The probe routine for these sensors (for instance cros_ec_sensors_probe) > can be called within the sensorhub probe routine > (cros_ec_sensors_probe()) > > Fixes: 145d59baff594 ("platform/chrome: cros_ec_sensorhub: Add FIFO support") > > Signed-off-by: Gwendal Grignou <gwendal@chromium.org> > --- > drivers/platform/chrome/cros_ec_sensorhub.c | 80 +++++++++++-------- > .../platform/chrome/cros_ec_sensorhub_ring.c | 73 ++++++++++------- > .../linux/platform_data/cros_ec_sensorhub.h | 1 + > 3 files changed, 93 insertions(+), 61 deletions(-)
I haven't done any review of this patch, but before this patch on my hardware enabling 'CONFIG_IIO_CROS_EC_SENSORS_CORE=y' would cause a NULL pointer dereference at boot. After picking this patch the NULL pointer dereference is gone. The details were in <https://crbug.com/1074471>. I haven't done any other testing than that, though. ;-) If it's useful:
Reported-by: Douglas Anderson <dianders@chromium.org> Tested-by: Douglas Anderson <dianders@chromium.org>
-Doug
| |