]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: host: break out when we find the right pdev in nvhost list
authorBryan Wu <pengw@nvidia.com>
Fri, 8 Mar 2013 04:10:35 +0000 (20:10 -0800)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 20:15:25 +0000 (13:15 -0700)
Without this break, it will keep searching and cause kernel oops
because it's deleting a list item and not using a safe iterator.

Bug 1249358

Change-Id: I4e5d7af2be8d422a5888ced04b9ee89310a57f0e
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/226475
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Allen Martin <amartin@nvidia.com>
drivers/video/tegra/host/dev.c

index 0ce2017e26a4e9857593861df657b71f2ab28d46..bcc156acdb65cf3b6c15f9774189679644f5fa0f 100644 (file)
@@ -116,6 +116,7 @@ void nvhost_device_list_remove(struct platform_device *pdev)
                if (nlist && nlist->pdev == pdev) {
                        list_del(&nlist->list);
                        kfree(nlist);
+                       break;
                }
        }
 }