archive mirror
 help / color / mirror / Atom feed
From: Alexandre Belloni <>
To: Colin King <>
Cc: Alessandro Zummo <>,
	Guenter Roeck <>,
	Chris Packham <>,,,
Subject: Re: [PATCH][next][V3] rtc: ds1307: check for failed memory allocation on wdt
Date: Fri, 3 Apr 2020 13:40:21 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 03/04/2020 12:04:37+0100, Colin King wrote:
> From: Colin Ian King <>
> Currently a failed memory allocation will lead to a null pointer
> dereference on point wdt.  Fix this by checking for a failed
> allocation and just returning.
> Addresses-Coverity: ("Dereference null return")
> Fixes: fd90d48db037 ("rtc: ds1307: add support for watchdog timer on ds1388")
> Signed-off-by: Colin Ian King <>
> ---
> V2: move error exit label and remove a return statement, thanks to 
>     Walter Harms for spotting this clean up.
> V3: simplify, just bail out and return on detecting the out of memory
>     condition
> ---
>  drivers/rtc/rtc-ds1307.c | 2 ++
>  1 file changed, 2 insertions(+)
Applied, thanks.

Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering

      reply	other threads:[~2020-04-03 11:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 11:04 [PATCH][next][V3] rtc: ds1307: check for failed memory allocation on wdt Colin King
2020-04-03 11:40 ` Alexandre Belloni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).