]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mfd: smsc-ece1099: Delete an error message for a failed memory allocation
authorMarkus Elfring <elfring@users.sourceforge.net>
Tue, 16 Jan 2018 07:52:27 +0000 (08:52 +0100)
committerLee Jones <lee.jones@linaro.org>
Wed, 16 May 2018 08:21:48 +0000 (09:21 +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@users.sourceforge.net>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/smsc-ece1099.c

index 93a8297de52aab6a54acfbfe511a22b6273de1a1..b9d96651cc0d980e5239d99839e8c540be551a8f 100644 (file)
@@ -39,10 +39,8 @@ static int smsc_i2c_probe(struct i2c_client *i2c,
 
        smsc = devm_kzalloc(&i2c->dev, sizeof(struct smsc),
                                GFP_KERNEL);
-       if (!smsc) {
-               dev_err(&i2c->dev, "smsc mfd driver memory allocation failed\n");
+       if (!smsc)
                return -ENOMEM;
-       }
 
        smsc->regmap = devm_regmap_init_i2c(i2c, &smsc_regmap_config);
        if (IS_ERR(smsc->regmap))