From: Hans Verkuil Date: Wed, 18 Oct 2017 08:11:46 +0000 (-0400) Subject: media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZERO X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=60757ee62be7ef4f2452265ab20cdf1f0b5d7934;p=openwrt%2Fstaging%2Fblogic.git media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZERO cec_allocate_adapter never returns NULL, so just use IS_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/cec/cec-pin.c b/drivers/media/cec/cec-pin.c index a4c881dc81c4..b48dfe844118 100644 --- a/drivers/media/cec/cec-pin.c +++ b/drivers/media/cec/cec-pin.c @@ -797,7 +797,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; }