mbox series

[-next,0/2] drm: Use PTR_ERR_OR_ZERO() to simplify code

Message ID 20230822071503.178000-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series drm: Use PTR_ERR_OR_ZERO() to simplify code | expand

Message

Jinjie Ruan Aug. 22, 2023, 7:15 a.m. UTC
PTR_ERR_OR_ZERO() return the error code within @ptr if it is
an error pointer, otherwise return 0. So use it to simplify code.

Jinjie Ruan (2):
  drm/bridge: Use PTR_ERR_OR_ZERO() to simplify code
  drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code

 drivers/gpu/drm/bridge/tc358762.c | 10 ++--------
 drivers/gpu/drm/bridge/tc358764.c |  5 +----
 drivers/gpu/drm/tegra/drm.c       |  5 +----
 drivers/gpu/drm/tegra/gem.c       |  5 +----
 4 files changed, 5 insertions(+), 20 deletions(-)