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:
Flavio Ceolin 2020-03-06 13:45:03 -08:00 committed by Jukka Rissanen
commit 6e25ebf269

View file

@ -18,7 +18,7 @@
int modem_pin_read(struct modem_context *ctx, u32_t pin) 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; 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) 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; 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) 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; return -ENODEV;
} }