Message ID | 1425950282-30548-2-git-send-email-sakari.ailus@iki.fi (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Sakari, Thank you for the patch. On Tuesday 10 March 2015 03:18:00 Sakari Ailus wrote: > 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: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/media/i2c/smiapp/smiapp-core.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c > b/drivers/media/i2c/smiapp/smiapp-core.c index b1f566b..565a00c 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; > }
Hi Sakari, Thanks for the patch. On Tue, Mar 10, 2015 at 1:18 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: > 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> Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cheers, --Prabhakar Lad > --- > drivers/media/i2c/smiapp/smiapp-core.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c > index b1f566b..565a00c 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; > } > > -- > 1.7.10.4 > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Mar 11, 2015 at 10:24 PM, Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote: > Hi Sakari, > > Thanks for the patch. > > On Tue, Mar 10, 2015 at 1:18 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote: >> 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> > > Tested-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> > I meant : Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Cheers, --Prabhakar Lad -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index b1f566b..565a00c 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; }
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> --- drivers/media/i2c/smiapp/smiapp-core.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)