Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1343360 > unrolled thread

[PATCH] selftests: media_dcevice_test fix to handle ioctl failure case

Started byShuah Khan <shuahkh@osg.samsung.com>
First post2016-02-25 18:50 +0100
Last post2016-02-25 18:50 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] selftests: media_dcevice_test fix to handle ioctl failure case Shuah Khan <shuahkh@osg.samsung.com> - 2016-02-25 18:50 +0100

#1343360 — [PATCH] selftests: media_dcevice_test fix to handle ioctl failure case

FromShuah Khan <shuahkh@osg.samsung.com>
Date2016-02-25 18:50 +0100
Subject[PATCH] selftests: media_dcevice_test fix to handle ioctl failure case
Message-ID<r68d4-7e6-1@gated-at.bofh.it>
Fix to print information returned by ioctl only when
it returns success.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
 tools/testing/selftests/media_tests/media_device_test.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/media_tests/media_device_test.c b/tools/testing/selftests/media_tests/media_device_test.c
index a47880b..7a4d613 100644
--- a/tools/testing/selftests/media_tests/media_device_test.c
+++ b/tools/testing/selftests/media_tests/media_device_test.c
@@ -86,8 +86,9 @@ int main(int argc, char **argv)
 		ret = ioctl(fd, MEDIA_IOC_DEVICE_INFO, &mdi);
 		if (ret < 0)
 			printf("Media Device Info errno %s\n", strerror(errno));
-		printf("Media device model %s driver %s\n",
-			mdi.model, mdi.driver);
+		else
+			printf("Media device model %s driver %s\n",
+				mdi.model, mdi.driver);
 		sleep(10);
 		count++;
 	}
-- 
2.5.0

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web