mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
To: Michael Riesch <>,
	Barebox <>
Subject: Re: Handle null pointer returned by of_overlay_fix_path properly
Date: Wed, 29 Jun 2022 09:37:40 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Hello Michael,

On 22.06.22 10:07, Michael Riesch wrote:
> Hi all,
> The function of_overlay_fix_path returns NULL in certain error cases but
> of_overlay_apply_symbols (which is the only caller) does not check the
> return value. For broken overlays this may result in an exception, which
> is probably not the best way to deal with this situation. I am not sure
> though what would be a good way to handle this error condition. Since
> the call happens in a loop, we may want to ignore the symbol in question
> and continue? Any thoughts?

I would abort overlay application on first error. If this can only
happen because of a malformed overlay, it makes no sense to apply
the overlay partially. Exiting with an error message is a service
to the user to investigate where it went wrong.


> Best regards,
> Michael

Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       |  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

      reply	other threads:[~2022-06-29  7:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-22  8:07 Michael Riesch
2022-06-29  7:37 ` Ahmad Fatoum [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