video: tegra: fix regulator_get return value check
Mallikarjun Kasoju [Fri, 22 Nov 2013 11:24:23 +0000 (16:24 +0530)]
regulator_get() returns either error pointer or valid pointers.
It never returns NULL. Hence it is not a correct to check
the return pointer as IS_ERR_OR_NULL(). It should be only IS_ERR()

Bug 1410234

Change-Id: Ie5362dfecf00919f081946e766a83b7076f517e1
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/334479
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>

drivers/video/tegra/camera/camera.c

index 9b0782b..a355ce9 100644 (file)
@@ -324,7 +324,7 @@ struct tegra_camera *tegra_camera_register(struct platform_device *ndev)
        camera->reg = regulator_get(&ndev->dev, "avdd_dsi_csi");
 #endif
 
-       if (IS_ERR_OR_NULL(camera->reg)) {
+       if (IS_ERR(camera->reg)) {
                ret = -ENODEV;
                if (camera->reg == ERR_PTR(-ENODEV)) {
                        camera->reg = NULL;