[media] smiapp: Clean up smiapp_get_pdata()
authorSakari Ailus <sakari.ailus@iki.fi>
Mon, 9 Mar 2015 23:44:40 +0000 (20:44 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Fri, 3 Apr 2015 01:24:00 +0000 (22:24 -0300)
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>
drivers/media/i2c/smiapp/smiapp-core.c

index f714eb7f4092c53d2951bbed4f560ace9a030d70..557f25def3a08bf8f99bddbd81e505da974b7fad 100644 (file)
@@ -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;
        }