[PATCH] media: ov5693: Simplify some error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dev_err_probe() already prints the error code in a human readable way, so
there is no need to duplicate it as a numerical value at the end of the
message.

Fixes: 89aef879cb53 ("media: i2c: Add support for ov5693 sensor")
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Sometimes, some people complain that dev_err_probe() calls should be
limited to probe functions and functions called from probe.

So maybe this should be converted to a plain dev_err().

Personally I don't fully agree. dev_err_probe() also has the advantage of
not being a macro and avoids some inlining.
So it can help to prevent the filling of the instruction cache of the
processor with things unlikely to be needed.
---
 drivers/media/i2c/ov5693.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/i2c/ov5693.c b/drivers/media/i2c/ov5693.c
index 82a9b2de7735..8cf9516b6d57 100644
--- a/drivers/media/i2c/ov5693.c
+++ b/drivers/media/i2c/ov5693.c
@@ -403,8 +403,8 @@ static int ov5693_read_reg(struct ov5693_device *ov5693, u32 addr, u32 *value)
 	ret = i2c_transfer(client->adapter, msg, 2);
 	if (ret < 0)
 		return dev_err_probe(&client->dev, ret,
-				     "Failed to read register 0x%04x: %d\n",
-				     addr & OV5693_REG_ADDR_MASK, ret);
+				     "Failed to read register 0x%04x\n",
+				     addr & OV5693_REG_ADDR_MASK);
 
 	*value = 0;
 	for (i = 0; i < len; ++i) {
-- 
2.34.1




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux