diff mbox series

media: v4l2: cci: print leading 0 on error

Message ID 20240111132003.2778044-1-julien.massot@collabora.com
State Accepted
Commit 58ab1f9e140006e9e5686640f1773260038fe889
Headers show
Series media: v4l2: cci: print leading 0 on error | expand

Commit Message

Julien Massot Jan. 11, 2024, 1:20 p.m. UTC
In some error cases leading '0' for register address
were missing.

Fixes: 613cbb91e9ce ("media: Add MIPI CCI register access helper functions")
Signed-off-by: Julien Massot <julien.massot@collabora.com>
---
 drivers/media/v4l2-core/v4l2-cci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Hans de Goede Jan. 11, 2024, 1:56 p.m. UTC | #1
Hi,

On 1/11/24 14:20, Julien Massot wrote:
> In some error cases leading '0' for register address
> were missing.
> 
> Fixes: 613cbb91e9ce ("media: Add MIPI CCI register access helper functions")
> Signed-off-by: Julien Massot <julien.massot@collabora.com>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans



> ---
>  drivers/media/v4l2-core/v4l2-cci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-cci.c b/drivers/media/v4l2-core/v4l2-cci.c
> index 10005c80f43b..ee3475bed37f 100644
> --- a/drivers/media/v4l2-core/v4l2-cci.c
> +++ b/drivers/media/v4l2-core/v4l2-cci.c
> @@ -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;
>  	}
> @@ -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:
diff mbox series

Patch

diff --git a/drivers/media/v4l2-core/v4l2-cci.c b/drivers/media/v4l2-core/v4l2-cci.c
index 10005c80f43b..ee3475bed37f 100644
--- a/drivers/media/v4l2-core/v4l2-cci.c
+++ b/drivers/media/v4l2-core/v4l2-cci.c
@@ -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;
 	}
@@ -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: