[PATCH 1/2] i2c-puv3: Delete an error message for a failed memory allocation in puv3_i2c_probe()

From: SF Markus Elfring
Date: Fri Feb 02 2018 - 10:01:23 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Feb 2018 15:41:26 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
drivers/i2c/busses/i2c-puv3.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c
index 287088b8c4c8..5bd001d01bef 100644
--- a/drivers/i2c/busses/i2c-puv3.c
+++ b/drivers/i2c/busses/i2c-puv3.c
@@ -198,7 +198,6 @@ static int puv3_i2c_probe(struct platform_device *pdev)

adapter = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL);
if (adapter == NULL) {
- dev_err(&pdev->dev, "can't allocate interface!\n");
rc = -ENOMEM;
goto fail_nomem;
}
--
2.16.1