Skip to content
Commit bcabdef1 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Grant Likely
Browse files

gpiolib: check descriptors validity before use



Some functions dereferenced their GPIO descriptor argument without
checking its validity first, potentially leading to an oops when given
an invalid argument.

This patch also makes gpio_get_value() more resilient when given an
invalid GPIO, returning 0 instead of silently crashing.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Cc: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent b0af9cd9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment