cec_allocate_adapter never returns NULL, so just use IS_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx> --- diff --git a/drivers/media/cec/cec-pin.c b/drivers/media/cec/cec-pin.c index e2aa5d6e619d..d98f4725253c 100644 --- a/drivers/media/cec/cec-pin.c +++ b/drivers/media/cec/cec-pin.c @@ -796,7 +796,7 @@ struct cec_adapter *cec_pin_allocate_adapter(const struct cec_pin_ops *pin_ops, caps | CEC_CAP_MONITOR_ALL | CEC_CAP_MONITOR_PIN, CEC_MAX_LOG_ADDRS); - if (PTR_ERR_OR_ZERO(adap)) { + if (IS_ERR(adap)) { kfree(pin); return adap; }