]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Distinguish no name from ENOMEM in set_unique()
authorTom Gundersen <teg@jklm.no>
Wed, 21 Sep 2016 14:59:18 +0000 (16:59 +0200)
committerSean Paul <seanpaul@chromium.org>
Thu, 22 Sep 2016 11:03:42 +0000 (04:03 -0700)
commita426e6fd4c0408c8a6d63bd4a5496d27df5ff00f
treef7da9bef6b7d107efd85ede18571e5e76c9c612a
parent63b493e2bd1a3fd555d9947ed36043d7abf52024
drm: Distinguish no name from ENOMEM in set_unique()

If passing name == NULL to drm_drv_set_unique() we now get -ENOMEM
as kstrdup() returns NULL. Instead check for this explicitly and
return -EINVAL if no name is provided.

Signed-off-by: Tom Gundersen <teg@jklm.no>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20160921145919.13754-1-teg@jklm.no
drivers/gpu/drm/drm_drv.c