Commit 0c703940 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

ioat: allocate channel context with calloc()



This ensures that any uninitialized fields are 0/NULL so if
ioat_channel_start() fails, ioat_channel_destruct() will not try to free
bogus pointers.

Change-Id: I99278c9fa280cbcdf3f7448e77db3ac98b59cdd6
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent b96536e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -498,7 +498,7 @@ ioat_attach(void *device)
	struct ioat_channel 	*ioat;
	uint32_t cmd_reg;

	ioat = malloc(sizeof(struct ioat_channel));
	ioat = calloc(1, sizeof(struct ioat_channel));
	if (ioat == NULL) {
		return NULL;
	}