summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ibm_iic.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2018-02-02 17:24:57 +0100
committerWolfram Sang <wsa@kernel.org>2023-06-07 14:11:23 +0200
commit6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad (patch)
treef6833d3d5ad520865d27be4f0bb660da17868b43 /drivers/i2c/busses/i2c-ibm_iic.c
parenti2c: davinci: Use struct name not type with devm_kzalloc() (diff)
downloadlinux-6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad.tar.xz
linux-6b3b21a8542fd2fb6ffc61bc13b9419f0c58ebad.zip
i2c: Delete error messages for failed memory allocations
These issues were detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-ibm_iic.c')
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 2d11577ded38..1ad9d3b26dd3 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -694,10 +694,8 @@ static int iic_probe(struct platform_device *ofdev)
int ret;
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
- if (!dev) {
- dev_err(&ofdev->dev, "failed to allocate device data\n");
+ if (!dev)
return -ENOMEM;
- }
platform_set_drvdata(ofdev, dev);