summaryrefslogtreecommitdiffstats
path: root/drivers/net/mctp
diff options
context:
space:
mode:
authorMatt Johnston <matt@codeconstruct.com.au>2022-04-01 04:48:43 +0200
committerDavid S. Miller <davem@davemloft.net>2022-04-01 13:04:15 +0200
commit8ce40a2fd350769e94877b53d353a3b11d85f43b (patch)
tree952020b844f49a6b1f4613541be63f95ca27eb59 /drivers/net/mctp
parentmctp: Fix check for dev_hard_header() result (diff)
downloadlinux-8ce40a2fd350769e94877b53d353a3b11d85f43b.tar.xz
linux-8ce40a2fd350769e94877b53d353a3b11d85f43b.zip
mctp i2c: correct mctp_i2c_header_create result
header_ops.create should return the length of the header, instead mctp_i2c_head_create() returned 0. This didn't cause any problem because the MCTP stack accepted 0 as success. Fixes: f5b8abf9fc3d ("mctp i2c: MCTP I2C binding driver") Signed-off-by: Matt Johnston <matt@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/mctp')
-rw-r--r--drivers/net/mctp/mctp-i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c
index baf7afac7857..53846c6b56ca 100644
--- a/drivers/net/mctp/mctp-i2c.c
+++ b/drivers/net/mctp/mctp-i2c.c
@@ -553,7 +553,7 @@ static int mctp_i2c_header_create(struct sk_buff *skb, struct net_device *dev,
hdr->source_slave = ((llsrc << 1) & 0xff) | 0x01;
mhdr->ver = 0x01;
- return 0;
+ return sizeof(struct mctp_i2c_hdr);
}
static int mctp_i2c_tx_thread(void *data)