From: Arnd Bergmann Date: Mon, 14 Mar 2016 22:40:08 +0000 (-0300) Subject: am437x-vfpe: fix typo in vpfe_get_app_input_index X-Git-Tag: Ubuntu-snapdragon-4.4.0-1033.37~721 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7e300a6597d205d74d85144124d7ace6ff5b3740;p=mirror_ubuntu-zesty-kernel.git am437x-vfpe: fix typo in vpfe_get_app_input_index BugLink: http://bugs.launchpad.net/bugs/1629386 commit 0fb504001192c1df62c847a8bb6558753c36ebef upstream. gcc-6 points out an obviously silly comparison in vpfe_get_app_input_index(): drivers/media/platform/am437x/am437x-vpfe.c: In function 'vpfe_get_app_input_index': drivers/media/platform/am437x/am437x-vpfe.c:1709:27: warning: self-comparison always evaluats to true [-Wtautological-compare] client->adapter->nr == client->adapter->nr) { ^~ This was introduced in a slighly incorrect conversion, and it's clear that the comparison was meant to compare the iterator to the current subdev instead, as we do in the line above. Fixes: d37232390fd4 ("[media] media: am437x-vpfe: match the OF node/i2c addr instead of name") Signed-off-by: Arnd Bergmann Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Greg Kroah-Hartman Signed-off-by: Tim Gardner --- diff --git a/drivers/media/platform/am437x/am437x-vpfe.c b/drivers/media/platform/am437x/am437x-vpfe.c index f0480d687f17..ba780c45f645 100644 --- a/drivers/media/platform/am437x/am437x-vpfe.c +++ b/drivers/media/platform/am437x/am437x-vpfe.c @@ -1706,7 +1706,7 @@ static int vpfe_get_app_input_index(struct vpfe_device *vpfe, sdinfo = &cfg->sub_devs[i]; client = v4l2_get_subdevdata(sdinfo->sd); if (client->addr == curr_client->addr && - client->adapter->nr == client->adapter->nr) { + client->adapter->nr == curr_client->adapter->nr) { if (vpfe->current_input >= 1) return -1; *app_input_index = j + vpfe->current_input;