]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
media: cec-pin: use IS_ERR instead of PTR_ERR_OR_ZERO
authorHans Verkuil <hverkuil@xs4all.nl>
Wed, 18 Oct 2017 08:11:46 +0000 (04:11 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Oct 2017 11:21:23 +0000 (07:21 -0400)
cec_allocate_adapter never returns NULL, so just use IS_ERR instead of
PTR_ERR_OR_ZERO.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/cec/cec-pin.c

index a4c881dc81c496531cf000d1e9f61c06bd7014c6..b48dfe844118bd0d43407bc805894c1fe51e69aa 100644 (file)
@@ -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;
        }