summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c/smiapp
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2015-03-10 00:44:40 +0100
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-04-03 03:24:00 +0200
commit0fd68f2f7aee2343f2396188362ba41447d8004f (patch)
tree957c672bf80f9f0983ed77c0b0032c01155030bf /drivers/media/i2c/smiapp
parent[media] media: i2c: add support for omnivision's ov2659 sensor (diff)
downloadlinux-0fd68f2f7aee2343f2396188362ba41447d8004f.tar.xz
linux-0fd68f2f7aee2343f2396188362ba41447d8004f.zip
[media] smiapp: Clean up smiapp_get_pdata()
Don't set rval when it's not used (the function returns a pointer to struct smiapp_platform_data). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/i2c/smiapp')
-rw-r--r--drivers/media/i2c/smiapp/smiapp-core.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c
index f714eb7f4092..557f25def3a0 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/media/i2c/smiapp/smiapp-core.c
@@ -2988,10 +2988,8 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
return NULL;
pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
- if (!pdata) {
- rval = -ENOMEM;
+ if (!pdata)
goto out_err;
- }
v4l2_of_parse_endpoint(ep, &bus_cfg);
@@ -3001,7 +2999,6 @@ static struct smiapp_platform_data *smiapp_get_pdata(struct device *dev)
break;
/* FIXME: add CCP2 support. */
default:
- rval = -EINVAL;
goto out_err;
}