Commit 46c8aa8e authored by Markus Elfring's avatar Markus Elfring Committed by Lee Jones
Browse files

mfd: smsc-ece1099: Delete an error message for a failed memory allocation



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

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 24303ee7
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -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))