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-prev] [day] [month] [year] [list]
Date:   Fri, 28 Dec 2018 01:43:05 +0100
From:   Alexandre Belloni <alexandre.belloni@...tlin.com>
To:     Aditya Pakki <pakki001@....edu>
Cc:     kjlu@....edu, Alessandro Zummo <a.zummo@...ertech.it>,
        linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtc: rv8803: Check return value of rv8803_write_reg

On 27/12/2018 14:28:55-0600, Aditya Pakki wrote:
> In rv8803_handle_irq, rv8803_write_reg can return a failed return
> value when attempting to write to the bus. The fix checks the output
> and throws a dev_warn notifying of the failure.
> 

Is there any point in doing that as the error will self correct later
anyway?

I really doubt there is any user reading the logs on the systems with an
rv8803 and there is no user action needed anyway.

> Signed-off-by: Aditya Pakki <pakki001@....edu>
> ---
>  drivers/rtc/rtc-rv8803.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-rv8803.c b/drivers/rtc/rtc-rv8803.c
> index 450a0b831a2d..5a19d5ecbf57 100644
> --- a/drivers/rtc/rtc-rv8803.c
> +++ b/drivers/rtc/rtc-rv8803.c
> @@ -180,8 +180,13 @@ static irqreturn_t rv8803_handle_irq(int irq, void *dev_id)
>  
>  	if (events) {
>  		rtc_update_irq(rv8803->rtc, 1, events);
> -		rv8803_write_reg(client, RV8803_FLAG, flags);
> -		rv8803_write_reg(rv8803->client, RV8803_CTRL, rv8803->ctrl);
> +		if (rv8803_write_reg(client, RV8803_FLAG, flags))
> +			dev_warn(&client->dev, "Failed to write RV8803 reg.\n");
> +
> +		if (rv8803_write_reg(rv8803->client, RV8803_CTRL,
> +					rv8803->ctrl))
> +			dev_warn(&rv8803->client->dev,
> +				"Failed to write RV8803_CTRL reg.\n");
>  	}
>  
>  	mutex_unlock(&rv8803->flags_lock);
> -- 
> 2.17.1
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ