summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/client.c
diff options
context:
space:
mode:
authorSu Hui <suhui@nfschina.com>2023-11-20 10:55:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-11-27 14:38:29 +0100
commit8f06aee8089cf42fd99a20184501bd1347ce61b9 (patch)
tree0ae252d86e246dc37c63da87dbdedc78c265bbcb /drivers/misc/mei/client.c
parentmei: pxp: fix mei_pxp_send_message return value (diff)
downloadlinux-8f06aee8089cf42fd99a20184501bd1347ce61b9.tar.xz
linux-8f06aee8089cf42fd99a20184501bd1347ce61b9.zip
misc: mei: client.c: return negative error code in mei_cl_write
mei_msg_hdr_init() return negative error code, rets should be 'PTR_ERR(mei_hdr)' rather than '-PTR_ERR(mei_hdr)'. Fixes: 0cd7c01a60f8 ("mei: add support for mei extended header.") Signed-off-by: Su Hui <suhui@nfschina.com> Link: https://lore.kernel.org/r/20231120095523.178385-1-suhui@nfschina.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r--drivers/misc/mei/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 9c8fc87938a7..7ea80779a0e2 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -2011,7 +2011,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
mei_hdr = mei_msg_hdr_init(cb);
if (IS_ERR(mei_hdr)) {
- rets = -PTR_ERR(mei_hdr);
+ rets = PTR_ERR(mei_hdr);
mei_hdr = NULL;
goto err;
}