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

Dan Carpenter dan.carpenter at oracle.com
Thu Feb 18 05:53:52 EST 2021


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




More information about the Linux-rockchip mailing list