drivers: modem: Remove invalid comparison
pin is an unsigned variable so there is no meaning check if it is less than zero. CID :208407 CID :208408 CID :208410 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
9d4fbb2912
commit
6e25ebf269
1 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
int modem_pin_read(struct modem_context *ctx, u32_t pin)
|
||||
{
|
||||
if (pin < 0 || pin >= ctx->pins_len) {
|
||||
if (pin >= ctx->pins_len) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ int modem_pin_read(struct modem_context *ctx, u32_t pin)
|
|||
|
||||
int modem_pin_write(struct modem_context *ctx, u32_t pin, u32_t value)
|
||||
{
|
||||
if (pin < 0 || pin >= ctx->pins_len) {
|
||||
if (pin >= ctx->pins_len) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ int modem_pin_write(struct modem_context *ctx, u32_t pin, u32_t value)
|
|||
|
||||
int modem_pin_config(struct modem_context *ctx, u32_t pin, bool enable)
|
||||
{
|
||||
if (pin < 0 || pin >= ctx->pins_len) {
|
||||
if (pin >= ctx->pins_len) {
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue