forked from Minki/linux
media: ccs: avoid printing an uninitialized variable
There is no intialization for the 'reg' variable, so printing
it produces undefined behavior as well as a compile-time warning:
drivers/media/i2c/ccs/ccs-core.c:314:49: error: variable 'reg' is uninitialized when used here [-Werror,-Wuninitialized]
"0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg,
Remove the variable and stop printing it.
Fixes: fd9065812c
("media: smiapp: Obtain frame descriptor from CCS limits")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
parent
cc17afa2e8
commit
747d230502
@ -268,7 +268,6 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor)
|
|||||||
u32 pixels;
|
u32 pixels;
|
||||||
char *which;
|
char *which;
|
||||||
char *what;
|
char *what;
|
||||||
u32 reg;
|
|
||||||
|
|
||||||
if (fmt_model_type == CCS_FRAME_FORMAT_MODEL_TYPE_2_BYTE) {
|
if (fmt_model_type == CCS_FRAME_FORMAT_MODEL_TYPE_2_BYTE) {
|
||||||
desc = CCS_LIM_AT(sensor, FRAME_FORMAT_DESCRIPTOR, i);
|
desc = CCS_LIM_AT(sensor, FRAME_FORMAT_DESCRIPTOR, i);
|
||||||
@ -322,7 +321,7 @@ static int ccs_read_frame_fmt(struct ccs_sensor *sensor)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dev_dbg(&client->dev,
|
dev_dbg(&client->dev,
|
||||||
"0x%8.8x %s pixels: %d %s (pixelcode %u)\n", reg,
|
"%s pixels: %d %s (pixelcode %u)\n",
|
||||||
what, pixels, which, pixelcode);
|
what, pixels, which, pixelcode);
|
||||||
|
|
||||||
if (i < ncol_desc) {
|
if (i < ncol_desc) {
|
||||||
|
Loading…
Reference in New Issue
Block a user