summaryrefslogtreecommitdiff
path: root/drivers/platform/surface/aggregator/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/surface/aggregator/core.c')
-rw-r--r--drivers/platform/surface/aggregator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/platform/surface/aggregator/core.c b/drivers/platform/surface/aggregator/core.c
index 54f86df77a37..b14e36871793 100644
--- a/drivers/platform/surface/aggregator/core.c
+++ b/drivers/platform/surface/aggregator/core.c
@@ -230,9 +230,12 @@ static int ssam_receive_buf(struct serdev_device *dev, const unsigned char *buf,
size_t n)
{
struct ssam_controller *ctrl;
+ int ret;
ctrl = serdev_device_get_drvdata(dev);
- return ssam_controller_receive_buf(ctrl, buf, n);
+ ret = ssam_controller_receive_buf(ctrl, buf, n);
+
+ return ret < 0 ? 0 : ret;
}
static void ssam_write_wakeup(struct serdev_device *dev)