aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2014-12-05 16:02:42 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-01-29 18:43:16 -0200
commit1ee5e7dd5eced2ec13d3810c55b4ecd73cb5c92f (patch)
treec8dd14548c70700f64fa7b934b6c232b8b02eb35 /drivers
parente5dd1100c7d3493a8a3c6ac79468978009204104 (diff)
[media] si2168: add own goto label for kzalloc failure
Use own label for kzalloc failure in which does not call kfree(). kfree() could be called with NULL, but it is still better to have own label which skips unnecessary kfree(). Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-frontends/si2168.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c
index f3fabd5fe455..06e54d10cc4f 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -672,7 +672,7 @@ static int si2168_probe(struct i2c_client *client,
if (!dev) {
ret = -ENOMEM;
dev_err(&client->dev, "kzalloc() failed\n");
- goto err_kfree;
+ goto err;
}
mutex_init(&dev->i2c_mutex);
@@ -700,6 +700,7 @@ static int si2168_probe(struct i2c_client *client,
return 0;
err_kfree:
kfree(dev);
+err:
dev_dbg(&client->dev, "failed=%d\n", ret);
return ret;
}

Privacy Policy