diff options
Diffstat (limited to 'drivers/gnss/sirf.c')
-rw-r--r-- | drivers/gnss/sirf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c index 71d014edd167..b3a4c0e91947 100644 --- a/drivers/gnss/sirf.c +++ b/drivers/gnss/sirf.c @@ -85,7 +85,7 @@ static int sirf_write_raw(struct gnss_device *gdev, const unsigned char *buf, /* write is only buffered synchronously */ ret = serdev_device_write(serdev, buf, count, MAX_SCHEDULE_TIMEOUT); - if (ret < 0) + if (ret < 0 || ret < count) return ret; /* FIXME: determine if interrupted? */ |