[media] smiapp: Initialise rval in smiapp_read_nvm()
authorSakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Thu, 26 Apr 2012 15:05:50 +0000 (12:05 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sun, 20 May 2012 15:46:27 +0000 (12:46 -0300)
rval was not properly initialised in smiapp_read_nvm(). Do that.

Signed-off-by: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/smiapp/smiapp-core.c

index 3bf086f836fb849e75fc731d89ea38d2c94aeeda..6524091a9a4cb550d7261d553cf96ed1827cc31b 100644 (file)
@@ -873,7 +873,7 @@ static int smiapp_read_nvm(struct smiapp_sensor *sensor,
                           unsigned char *nvm)
 {
        u32 i, s, p, np, v;
-       int rval, rval2;
+       int rval = 0, rval2;
 
        np = sensor->nvm_size / SMIAPP_NVM_PAGE_SIZE;
        for (p = 0; p < np; p++) {