aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mctp/mctp-i2c.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2024-11-04 07:46:55 +0000
committerBartosz Golaszewski <[email protected]>2024-11-04 07:46:55 +0000
commita7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88 (patch)
tree3d0296da382dd92ab964719d981fa32ee383e886 /drivers/net/mctp/mctp-i2c.c
parentgpio: mpsse: Check for error code from devm_mutex_init() call (diff)
parentLinux 6.12-rc6 (diff)
downloadkernel-a7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88.tar.gz
kernel-a7a86fe18b9a3c1e3f2c0b4687bf53cc2b9f9f88.zip
Merge tag 'v6.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into gpio/for-next
Linux 6.12-rc6
Diffstat (limited to 'drivers/net/mctp/mctp-i2c.c')
-rw-r--r--drivers/net/mctp/mctp-i2c.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c
index 4dc057c121f5..e70fb6687994 100644
--- a/drivers/net/mctp/mctp-i2c.c
+++ b/drivers/net/mctp/mctp-i2c.c
@@ -588,6 +588,9 @@ static int mctp_i2c_header_create(struct sk_buff *skb, struct net_device *dev,
if (len > MCTP_I2C_MAXMTU)
return -EMSGSIZE;
+ if (!daddr || !saddr)
+ return -EINVAL;
+
lldst = *((u8 *)daddr);
llsrc = *((u8 *)saddr);