From: Paul Bolle Date: Thu, 1 Nov 2012 20:00:09 +0000 (-0300) Subject: [media] tda18212: tda18218: use 'val' if initialized X-Git-Tag: v3.9-rc1~93^2~477 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed2e33011451f655052ff1d3aa9ee936057d508b;p=pandora-kernel.git [media] tda18212: tda18218: use 'val' if initialized Commits e666a44fa313cb9329c0381ad02fc6ee1e21cb31 ("[media] tda18212: silence compiler warning") and e0e52d4e9f5bce7ea887027c127473eb654a5a04 ("[media] tda18218: silence compiler warning") silenced warnings equivalent to these: drivers/media/tuners/tda18212.c: In function ‘tda18212_attach’: drivers/media/tuners/tda18212.c:299:2: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] drivers/media/tuners/tda18218.c: In function ‘tda18218_attach’: drivers/media/tuners/tda18218.c:305:2: warning: ‘val’ may be used uninitialized in this function [-Wmaybe-uninitialized] But in both cases 'val' will still be used uninitialized if the calls of tda18212_rd_reg() or tda18218_rd_reg() fail. Fix this by only printing the "chip id" if the calls of those functions were successful. This allows to drop the uninitialized_var() stopgap measure. Also stop printing the return values of tda18212_rd_reg() or tda18218_rd_reg(), as these are not interesting. Signed-off-by: Paul Bolle Acked-by: Antti Palosaari Reviewed-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed