summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-03-08 08:15:23 -0400
committerTom Rini <trini@konsulko.com>2015-03-08 08:15:23 -0400
commitbd4f706aa872fd5793f150fc98a8131e9b4e911d (patch)
tree500fbc8fc91e296453e37461bd4713a8b0e56e5e /drivers
parent62f3aaf89d01bdc9ff0e67d92f3bf085143edf8c (diff)
parent65eb659e56fadf8183532d95db1d06fb63c60f9f (diff)
downloadu-boot-imx-bd4f706aa872fd5793f150fc98a8131e9b4e911d.zip
u-boot-imx-bd4f706aa872fd5793f150fc98a8131e9b4e911d.tar.gz
u-boot-imx-bd4f706aa872fd5793f150fc98a8131e9b4e911d.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/i2c-uclass.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/i2c/i2c-uclass.c b/drivers/i2c/i2c-uclass.c
index a6991bf..b890806 100644
--- a/drivers/i2c/i2c-uclass.c
+++ b/drivers/i2c/i2c-uclass.c
@@ -230,6 +230,8 @@ static int i2c_bind_driver(struct udevice *bus, uint chip_addr, uint offset_len,
snprintf(name, sizeof(name), "generic_%x", chip_addr);
str = strdup(name);
+ if (!str)
+ return -ENOMEM;
ret = device_bind_driver(bus, "i2c_generic_chip_drv", str, &dev);
debug("%s: device_bind_driver: ret=%d\n", __func__, ret);
if (ret)