Commit 5baeb157 authored by Ruffalo Lavoisier's avatar Ruffalo Lavoisier Committed by Greg Kroah-Hartman
Browse files

comedi: ni_routing: tools: Check when the file could not be opened

parent 0bad5770
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -140,6 +140,11 @@ int main(void)
{
	FILE *fp = fopen("ni_values.py", "w");

	if (fp == NULL) {
		fprintf(stderr, "Could not open file!");
		return -1;
	}

	/* write route register values */
	fprintf(fp, "ni_route_values = {\n");
	for (int i = 0; ni_all_route_values[i]; ++i)