ptp: ocp: Fix a couple NULL vs IS_ERR() checks
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 18 Nov 2021 11:22:11 +0000 (14:22 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 08:48:40 +0000 (09:48 +0100)
commit20540cb666a6f0d218d29bc0c6fb371cd64fad8c
tree01f3e9ff30ebf83f2a2d18e845f7e4058052bf96
parent4d42da0c86b87de11da775b7994fbc1cea4d63b1
ptp: ocp: Fix a couple NULL vs IS_ERR() checks

[ Upstream commit c7521d3aa2fa7fc785682758c99b5bcae503f6be ]

The ptp_ocp_get_mem() function does not return NULL, it returns error
pointers.

Fixes: 773bda964921 ("ptp: ocp: Expose various resources on the timecard.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ptp/ptp_ocp.c