Browse Source

cs378x: Check return value of connect function.

Georgi Chorbadzhiyski 12 years ago
parent
commit
3f4d1e9719
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      camd-cs378x.c

+ 2
- 1
camd-cs378x.c View File

@@ -70,7 +70,8 @@ static int cs378x_send_buf(struct camd *c, int data_len) {
70 70
 	int i;
71 71
 	unsigned char dump[16];
72 72
 
73
-	cs378x_connect(c);
73
+	if (cs378x_connect(c) < 0)
74
+		return -1;
74 75
 
75 76
 	// Prepare auth token (only once)
76 77
 	if (!c->cs378x.auth_token) {

Loading…
Cancel
Save