Skip to content

Commit 45a012a

Browse files
ausyskingregkh
authored andcommitted
mei: return error on notification request to a disconnected client
[ Upstream commit 7c47d2ca0feca767479329da23523ed798acb854 ] Request for a notification from a disconnected client will be ignored silently by the FW but the caller should know that the operation hasn't succeeded. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0e97077 commit 45a012a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/misc/mei/client.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,9 @@ int mei_cl_notify_request(struct mei_cl *cl, struct file *file, u8 request)
13001300
return -EOPNOTSUPP;
13011301
}
13021302

1303+
if (!mei_cl_is_connected(cl))
1304+
return -ENODEV;
1305+
13031306
rets = pm_runtime_get(dev->dev);
13041307
if (rets < 0 && rets != -EINPROGRESS) {
13051308
pm_runtime_put_noidle(dev->dev);

0 commit comments

Comments
 (0)