lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180920134219.8402-1-songqiang1304521@gmail.com>
Date:   Thu, 20 Sep 2018 21:42:19 +0800
From:   Song Qiang <songqiang1304521@...il.com>
To:     jic23@...nel.org, knaack.h@....de, lars@...afoo.de,
        pmeerw@...erw.net, shubhrajyoti@...com
Cc:     linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
        Song Qiang <songqiang1304521@...il.com>
Subject: [PATCH] iio: magnetometer: hmc5843: Replace a return value.

This error apparently is caused by timed out event, so a -ETIMEDOUT
should be used instead of a -EIO, and it also tells user what happened
, so this dev_err may not be needed anymore.

Signed-off-by: Song Qiang <songqiang1304521@...il.com>
---
I used ./scripts/get_maintainer.pl to get maintainers about this file,
I thought this script searches maintainers with looking up MAINTAINER,
is that right?
So I searched MAINTAINER and also found nothing related to hmc5843.
In the declearation area I can see Shubhrajyoti Datta 
<shubhrajyoti@...com> wroted this driver and several other people
including Peter Meerwald have contributed. Is this driver now a orphan?
Or if it is, I think we may also need to add it to the MAINTAINER file.
I'm also familiar with this device, I think I can add interrupt support
later.

 drivers/iio/magnetometer/hmc5843_core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/magnetometer/hmc5843_core.c b/drivers/iio/magnetometer/hmc5843_core.c
index ada142fb7aa3..4fb393c3854c 100644
--- a/drivers/iio/magnetometer/hmc5843_core.c
+++ b/drivers/iio/magnetometer/hmc5843_core.c
@@ -170,8 +170,7 @@ static int hmc5843_wait_measurement(struct hmc5843_data *data)
 	}
 
 	if (tries < 0) {
-		dev_err(data->dev, "data not ready\n");
-		return -EIO;
+		return -ETIMEDOUT;
 	}
 
 	return 0;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ