From 9e6f482cd8400633a50e8249d71152a4277a75a7 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Sun, 8 Nov 2015 16:18:47 -0800 Subject: 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 Signed-off-by: Sascha Hauer --- drivers/i2c/busses/i2c-imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/i2c/busses/i2c-imx.c') 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); -- cgit v1.2.3