Re: [PATCH v1 06/18] media: hantro: Make sure that ctx->codex_ops is set

From: Dan Carpenter
Date: Thu Feb 18 2021 - 07:51:02 EST


On Wed, Feb 17, 2021 at 09:02:54AM +0100, Benjamin Gaignard wrote:
> Do not try to call ctx->codec_ops->done if ctx->codec_ops is not set.
>

When you're writing a patch like this please say in the commit message
if this can happen or not. Option 1:

Option 1: sometimes this is NULL in <some situation>
Option 2: this can't be NULL, but we are planning to allow that.
Option 3: I don't know if this can be NULL but do it for consistency

As we review and packport patches we have to figure out why you are
adding NULL checks so it really helps if you just tell us.

regards,
dan carpenter