Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
This was found using a static code analysis program called cppcheck.
Rickard Strandqvist (1):
staging: imx-drm: ipu-v3: ipu-common.c: Cleaning up return of uninitialized variable
drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
1.7.10.4
Before when there was an error a uninitialized variable would be returnd.
Now it returns -ENODEV
Signed-off-by: Rickard Strandqvist <[email protected]>
---
drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
index ca85d3d..468e364 100644
--- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c
+++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c
@@ -1002,7 +1002,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu)
{
struct device *dev = ipu->dev;
unsigned i;
- int id, ret;
+ int id;
mutex_lock(&ipu_client_id_mutex);
id = ipu_client_id;
@@ -1025,7 +1025,7 @@ static int ipu_add_client_devices(struct ipu_soc *ipu)
err_register:
platform_device_unregister_children(to_platform_device(dev));
- return ret;
+ return -ENODEV;
}
--
1.7.10.4
On Sun, Jun 15, 2014 at 01:35:21AM +0200, Rickard Strandqvist wrote:
> Before when there was an error a uninitialized variable would be returnd.
> Now it returns -ENODEV
>
> Signed-off-by: Rickard Strandqvist <[email protected]>
> ---
> drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
This file isn't even in the tree anymore, what did you make this patch
against?
Hi
The mainline form about Jun 6.
And now it is in drivers/gpu/ipu-v3/ipu-common.c
Still with the same error.
Sorry, I have started to compare to linux-next, but I do it as:
diff `find . ../linux-next/ -name ipu-common.c`
So missed that the file had moved :-/
Ok, I send a new patch then..
Kind regards
Rickard Strandqvist
2014-06-20 0:51 GMT+02:00 Greg Kroah-Hartman <[email protected]>:
> On Sun, Jun 15, 2014 at 01:35:21AM +0200, Rickard Strandqvist wrote:
>> Before when there was an error a uninitialized variable would be returnd.
>> Now it returns -ENODEV
>>
>> Signed-off-by: Rickard Strandqvist <[email protected]>
>> ---
>> drivers/staging/imx-drm/ipu-v3/ipu-common.c | 4 ++--
>
> This file isn't even in the tree anymore, what did you make this patch
> against?