summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-imx.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2015-11-08 16:18:47 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2015-11-19 08:58:25 +0100
commit9e6f482cd8400633a50e8249d71152a4277a75a7 (patch)
tree0ee8ab6dfaf12adac16f3db271f06973f23cc0a1 /drivers/i2c/busses/i2c-imx.c
parent0534926f41927d8d7b8bef9dd67520b43ad81989 (diff)
downloadbarebox-9e6f482cd8400633a50e8249d71152a4277a75a7.tar.gz
barebox-9e6f482cd8400633a50e8249d71152a4277a75a7.tar.xz
i2c-imx: Use xzalloc instead of kzalloc
Driver's private data structure is allocated with kzalloc without any code to check for kzalloc's possible failure. Fix that by replaceing kzalloc with xzalloc. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-imx.c')
-rw-r--r--drivers/i2c/busses/i2c-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
index 7df4a26dd3..affc277164 100644
--- a/drivers/i2c/busses/i2c-imx.c
+++ b/drivers/i2c/busses/i2c-imx.c
@@ -590,7 +590,7 @@ static int __init i2c_fsl_probe(struct device_d *pdev)
pdata = pdev->platform_data;
- i2c_fsl = kzalloc(sizeof(struct fsl_i2c_struct), GFP_KERNEL);
+ i2c_fsl = xzalloc(sizeof(*i2c_fsl));
#ifdef CONFIG_COMMON_CLK
i2c_fsl->clk = clk_get(pdev, NULL);