Skip to content

Commit 959f724

Browse files
thomasmeyairlied
authored andcommitted
drm/udl: Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(.. [1]
The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 41494cb commit 959f724

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/udl/udl_gem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ struct drm_gem_object *udl_gem_prime_import(struct drm_device *dev,
308308
/* need to attach */
309309
attach = dma_buf_attach(dma_buf, dev->dev);
310310
if (IS_ERR(attach))
311-
return ERR_PTR(PTR_ERR(attach));
311+
return ERR_CAST(attach);
312312

313313
sg = dma_buf_map_attachment(attach, DMA_BIDIRECTIONAL);
314314
if (IS_ERR(sg)) {

0 commit comments

Comments
 (0)