{
        struct optee *optee = tee_get_drvdata(ctx->teedev);
        struct optee_supp *supp = &optee->supp;
-       struct optee_supp_req *req = kzalloc(sizeof(*req), GFP_KERNEL);
+       struct optee_supp_req *req;
        bool interruptable;
        u32 ret;
 
+       /*
+        * Return in case there is no supplicant available and
+        * non-blocking request.
+        */
+       if (!supp->ctx && ctx->supp_nowait)
+               return TEEC_ERROR_COMMUNICATION;
+
+       req = kzalloc(sizeof(*req), GFP_KERNEL);
        if (!req)
                return TEEC_ERROR_OUT_OF_MEMORY;
 
 
        if (IS_ERR(ctx))
                return PTR_ERR(ctx);
 
+       /*
+        * Default user-space behaviour is to wait for tee-supplicant
+        * if not present for any requests in this context.
+        */
+       ctx->supp_nowait = false;
        filp->private_data = ctx;
        return 0;
 }
        } while (IS_ERR(ctx) && PTR_ERR(ctx) != -ENOMEM);
 
        put_device(put_dev);
+       /*
+        * Default behaviour for in kernel client is to not wait for
+        * tee-supplicant if not present for any requests in this context.
+        * Also this flag could be configured again before call to
+        * tee_client_open_session() if any in kernel client requires
+        * different behaviour.
+        */
+       ctx->supp_nowait = true;
        return ctx;
 }
 EXPORT_SYMBOL_GPL(tee_client_open_context);
 
  * @releasing:  flag that indicates if context is being released right now.
  *             It is needed to break circular dependency on context during
  *              shared memory release.
+ * @supp_nowait: flag that indicates that requests in this context should not
+ *              wait for tee-supplicant daemon to be started if not present
+ *              and just return with an error code. It is needed for requests
+ *              that arises from TEE based kernel drivers that should be
+ *              non-blocking in nature.
  */
 struct tee_context {
        struct tee_device *teedev;
        void *data;
        struct kref refcount;
        bool releasing;
+       bool supp_nowait;
 };
 
 struct tee_param_memref {