Skip to content

Commit 5417927

Browse files
ausyskingregkh
authored andcommitted
mei: bus-fixup:upon error print return values of send and receive
[ Upstream commit 4b8659e ] For easier debugging, upon error, print also return values from __mei_cl_recv() and __mei_cl_send() functions. Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 49b326c commit 5417927

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/misc/mei/bus-fixup.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
175175
ret = __mei_cl_send(cldev->cl, (u8 *)&req, sizeof(req), 0,
176176
MEI_CL_IO_TX_BLOCKING);
177177
if (ret < 0) {
178-
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd\n");
178+
dev_err(&cldev->dev, "Could not send ReqFWVersion cmd ret = %d\n", ret);
179179
return ret;
180180
}
181181

@@ -187,7 +187,7 @@ static int mei_fwver(struct mei_cl_device *cldev)
187187
* Should be at least one version block,
188188
* error out if nothing found
189189
*/
190-
dev_err(&cldev->dev, "Could not read FW version\n");
190+
dev_err(&cldev->dev, "Could not read FW version ret = %d\n", bytes_recv);
191191
return -EIO;
192192
}
193193

@@ -337,7 +337,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
337337
ret = __mei_cl_send(cl, (u8 *)&cmd, sizeof(cmd), 0,
338338
MEI_CL_IO_TX_BLOCKING);
339339
if (ret < 0) {
340-
dev_err(bus->dev, "Could not send IF version cmd\n");
340+
dev_err(bus->dev, "Could not send IF version cmd ret = %d\n", ret);
341341
return ret;
342342
}
343343

@@ -352,7 +352,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
352352
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, &vtag,
353353
0, 0);
354354
if (bytes_recv < 0 || (size_t)bytes_recv < if_version_length) {
355-
dev_err(bus->dev, "Could not read IF version\n");
355+
dev_err(bus->dev, "Could not read IF version ret = %d\n", bytes_recv);
356356
ret = -EIO;
357357
goto err;
358358
}

0 commit comments

Comments
 (0)