* [PATCH] staging: davinci_vpfe: fix error check
@ 2014-02-15 10:17 Levente Kurusa
2014-02-15 17:16 ` Josh Triplett
0 siblings, 1 reply; 3+ messages in thread
From: Levente Kurusa @ 2014-02-15 10:17 UTC (permalink / raw)
To: Greg Kroah-Hartman, Mauro Carvalho Chehab
Cc: LKML, OSUOSL Drivers, Linux Media, Josh Triplett, Lisa Nguyen,
Archana kumari, David Binderman, Levente Kurusa
The check would check the pointer, which is never less than 0.
According to the error message, the correct check would be
to check the return value of ipipe_mode. Check that instead.
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Levente Kurusa <levex@linux.com>
---
drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
index 2d36b60..b2daf5e 100644
--- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
+++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
@@ -267,7 +267,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
}
ipipe_mode = get_ipipe_mode(ipipe);
- if (ipipe < 0) {
+ if (ipipe_mode < 0) {
pr_err("Failed to get ipipe mode");
return -EINVAL;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: davinci_vpfe: fix error check
2014-02-15 10:17 [PATCH] staging: davinci_vpfe: fix error check Levente Kurusa
@ 2014-02-15 17:16 ` Josh Triplett
2014-02-18 14:32 ` Laurent Pinchart
0 siblings, 1 reply; 3+ messages in thread
From: Josh Triplett @ 2014-02-15 17:16 UTC (permalink / raw)
To: Levente Kurusa
Cc: Greg Kroah-Hartman, Mauro Carvalho Chehab, LKML, OSUOSL Drivers,
Linux Media, Lisa Nguyen, Archana kumari, David Binderman
On Sat, Feb 15, 2014 at 11:17:11AM +0100, Levente Kurusa wrote:
> The check would check the pointer, which is never less than 0.
> According to the error message, the correct check would be
> to check the return value of ipipe_mode. Check that instead.
>
> Reported-by: David Binderman <dcb314@hotmail.com>
> Signed-off-by: Levente Kurusa <levex@linux.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> index 2d36b60..b2daf5e 100644
> --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> @@ -267,7 +267,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
> }
>
> ipipe_mode = get_ipipe_mode(ipipe);
> - if (ipipe < 0) {
> + if (ipipe_mode < 0) {
> pr_err("Failed to get ipipe mode");
> return -EINVAL;
> }
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: davinci_vpfe: fix error check
2014-02-15 17:16 ` Josh Triplett
@ 2014-02-18 14:32 ` Laurent Pinchart
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Pinchart @ 2014-02-18 14:32 UTC (permalink / raw)
To: Prabhakar Lad
Cc: Josh Triplett, Levente Kurusa, LKML, Linux Media, Lisa Nguyen,
Archana kumari, David Binderman
Hi Prabhakar,
(Removing Greg, Mauro and the devel@driverdev.osuosl.org list to avoid
spamming them)
On Saturday 15 February 2014 09:16:19 Josh Triplett wrote:
> On Sat, Feb 15, 2014 at 11:17:11AM +0100, Levente Kurusa wrote:
> > The check would check the pointer, which is never less than 0.
> > According to the error message, the correct check would be
> > to check the return value of ipipe_mode. Check that instead.
> >
> > Reported-by: David Binderman <dcb314@hotmail.com>
> > Signed-off-by: Levente Kurusa <levex@linux.com>
>
> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Could you please handle this patch ?
> > drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> > b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c index
> > 2d36b60..b2daf5e 100644
> > --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> > +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c
> > @@ -267,7 +267,7 @@ int config_ipipe_hw(struct vpfe_ipipe_device *ipipe)
> >
> > }
> >
> > ipipe_mode = get_ipipe_mode(ipipe);
> > - if (ipipe < 0) {
> > + if (ipipe_mode < 0) {
> > pr_err("Failed to get ipipe mode");
> > return -EINVAL;
> > }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-18 14:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-15 10:17 [PATCH] staging: davinci_vpfe: fix error check Levente Kurusa
2014-02-15 17:16 ` Josh Triplett
2014-02-18 14:32 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox