iommu/mediatek: Fix handling of of_count_phandle_with_args result
authorAndrzej Hajda <a.hajda@samsung.com>
Tue, 1 Mar 2016 09:36:23 +0000 (10:36 +0100)
committerJoerg Roedel <jroedel@suse.de>
Tue, 1 Mar 2016 11:33:46 +0000 (12:33 +0100)
commit0b6c0ad3cfe6bc914af3ae595c9729e38f11a024
tree5d2bed1e9d0fbe7d0c74140d70cd00c5f365ee54
parentfd99f796a20b1a805c80ee51d7349d65103e7aaf
iommu/mediatek: Fix handling of of_count_phandle_with_args result

The function can return negative value so it should be assigned to signed
variable. The patch changes also type of related i variable to make code
more compact and coherent.

The problem has been detected using patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/mtk_iommu.c
This page took 0.057078 seconds and 5 git commands to generate.