summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-boardinfo.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 09:41:33 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2018-02-01 09:41:33 +0100
commit10a558374f3751cf4eb55143008975641dfc2cf4 (patch)
treeaab0def9d2289f6520ffb62ec4c1d738135447c4 /drivers/i2c/i2c-boardinfo.c
parentInput: goodix - use generic touchscreen_properties (diff)
parentLinux 4.15 (diff)
downloadlinux-10a558374f3751cf4eb55143008975641dfc2cf4.tar.xz
linux-10a558374f3751cf4eb55143008975641dfc2cf4.zip
Merge tag 'v4.15' into next
Sync with mainline to get in trackpoint updates and other changes.
Diffstat (limited to 'drivers/i2c/i2c-boardinfo.c')
-rw-r--r--drivers/i2c/i2c-boardinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c
index 31186ead5a40..509a6007cdf6 100644
--- a/drivers/i2c/i2c-boardinfo.c
+++ b/drivers/i2c/i2c-boardinfo.c
@@ -86,6 +86,7 @@ int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsig
property_entries_dup(info->properties);
if (IS_ERR(devinfo->board_info.properties)) {
status = PTR_ERR(devinfo->board_info.properties);
+ kfree(devinfo);
break;
}
}
@@ -98,6 +99,7 @@ int i2c_register_board_info(int busnum, struct i2c_board_info const *info, unsig
GFP_KERNEL);
if (!devinfo->board_info.resources) {
status = -ENOMEM;
+ kfree(devinfo);
break;
}
}