From cf9256f962c747a95720ceb88e076118743309b8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 17 Feb 2013 18:52:19 +0100 Subject: [PATCH 1/1] suppress error callbacks if requested --- dev.c | 2 +- uqmi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dev.c b/dev.c index 486230a..ed9d60f 100644 --- a/dev.c +++ b/dev.c @@ -58,7 +58,7 @@ static void __qmi_request_complete(struct qmi_dev *qmi, struct qmi_request *req, if (req->ret) msg = NULL; - if (req->cb) + if (req->cb && (msg || !req->no_error_cb)) req->cb(qmi, req, msg); if (req->complete) { diff --git a/uqmi.h b/uqmi.h index a404da5..2f06890 100644 --- a/uqmi.h +++ b/uqmi.h @@ -70,6 +70,7 @@ struct qmi_request { bool *complete; bool pending; + bool no_error_cb; uint8_t service; uint16_t tid; int ret; -- 2.11.0