Skip to content

Commit

Permalink
media: v4l2: cci: print leading 0 on error
Browse files Browse the repository at this point in the history
[ Upstream commit 58ab1f9e140006e9e5686640f1773260038fe889 ]

In some error cases leading '0' for register address
were missing.

Fixes: 613cbb9 ("media: Add MIPI CCI register access helper functions")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Julien Massot authored and Sasha Levin committed Mar 26, 2024
1 parent 7affe25 commit 928e611
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/v4l2-core/v4l2-cci.c
Expand Up @@ -32,7 +32,7 @@ int cci_read(struct regmap *map, u32 reg, u64 *val, int *err)

ret = regmap_bulk_read(map, reg, buf, len);
if (ret) {
dev_err(regmap_get_device(map), "Error reading reg 0x%4x: %d\n",
dev_err(regmap_get_device(map), "Error reading reg 0x%04x: %d\n",
reg, ret);
goto out;
}
Expand Down Expand Up @@ -131,7 +131,7 @@ int cci_write(struct regmap *map, u32 reg, u64 val, int *err)

ret = regmap_bulk_write(map, reg, buf, len);
if (ret)
dev_err(regmap_get_device(map), "Error writing reg 0x%4x: %d\n",
dev_err(regmap_get_device(map), "Error writing reg 0x%04x: %d\n",
reg, ret);

out:
Expand Down

0 comments on commit 928e611

Please sign in to comment.