Message ID | cfd1ee7e-6f4d-7d05-b857-a509887a6bc4@users.sourceforge.net |
---|---|
State | Not Applicable |
Headers | show |
Series | I2C-Blackfin TWI: Adjustments for i2c_bfin_twi_probe() | expand |
diff --git a/drivers/i2c/busses/i2c-bfin-twi.c b/drivers/i2c/busses/i2c-bfin-twi.c index ff3343186a82..ed596fd56b8b 100644 --- a/drivers/i2c/busses/i2c-bfin-twi.c +++ b/drivers/i2c/busses/i2c-bfin-twi.c @@ -621,10 +621,8 @@ static int i2c_bfin_twi_probe(struct platform_device *pdev) iface = devm_kzalloc(&pdev->dev, sizeof(struct bfin_twi_iface), GFP_KERNEL); - if (!iface) { - dev_err(&pdev->dev, "Cannot allocate memory\n"); + if (!iface) return -ENOMEM; - } spin_lock_init(&(iface->lock));