The create_in_format_blob() function returns NULL on error. It never
returns error pointers. Update the check to match.
Fixes: 0d6dcd741c26 ("drm/plane: modify create_in_formats to acommodate async")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/gpu/drm/drm_plane.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c
index beef2a06bc75..2f5a95bc0528 100644
--- a/drivers/gpu/drm/drm_plane.c
+++ b/drivers/gpu/drm/drm_plane.c
@@ -483,7 +483,7 @@ static int __drm_universal_plane_init(struct drm_device *dev,
if (format_modifier_count) {
blob = create_in_format_blob(dev, plane,
plane->funcs->format_mod_supported);
- if (!IS_ERR(blob))
+ if (blob)
drm_object_attach_property(&plane->base,
config->modifiers_property,
blob->base.id);
@@ -492,7 +492,7 @@ static int __drm_universal_plane_init(struct drm_device *dev,
if (plane->funcs->format_mod_supported_async) {
blob = create_in_format_blob(dev, plane,
plane->funcs->format_mod_supported_async);
- if (!IS_ERR(blob))
+ if (blob)
drm_object_attach_property(&plane->base,
config->async_modifiers_property,
blob->base.id);
--
2.47.2