Check return values when storing peripheral info

Without these checks, in rare cases, this could trigger huddly-updater
to perform a control transfer to a device that didn't exist and thus
segfault.

BUG=chromium:752708
TEST=Plug/unplug the device until "failed to store peripheral info" is
written to /var/log/messages. A segfault should not occur.

Change-Id: I2402df0405652d81ea2c488a6c3dbfd935424ad6
Reviewed-on: https://chromium-review.googlesource.com/641590
Commit-Ready: Emil Lundmark <lndmrk@chromium.org>
Tested-by: Emil Lundmark <lndmrk@chromium.org>
Reviewed-by: Jiwoong Lee <porce@chromium.org>
2 files changed
tree: 25797acf5078eda129ced0fc23155b1264f24a6c
  1. conf/
  2. src/
  3. .gitignore
  4. COMMIT-QUEUE.ini
  5. common.mk
  6. LICENSE
  7. Makefile
  8. OWNERS
  9. README.md
README.md

Huddly-updater is a utility to upgrade the huddly camera firmware.

Requirements

TODO: The GNU C library, libusb 1.0 and libudev are required.

Building

At the root of the repository,

$ make

Alternatively at Chromium OS development environment,

$ emerge-$${BOARD} huddly-updater

How to use

$ huddly-updater --help

TODO

It will also provide assistant tools to query the firmware version of the firmware installed in the huddly camera, that of a binary blob file.