Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce9b9b08 authored by Joe Carnuccio's avatar Joe Carnuccio Committed by Christoph Hellwig
Browse files

qla2xxx: ISP27xx fwdump template fix insertbuf() routine.

parent 01cb65f1
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -128,18 +128,10 @@ qla27xx_insert32(uint32_t value, void *buf, ulong *len)
static inline void
qla27xx_insertbuf(void *mem, ulong size, void *buf, ulong *len)
{
	ulong cnt = size;

	if (buf && mem) {
	if (buf && mem && size) {
		buf += *len;
		while (cnt >= sizeof(uint32_t)) {
			*(__le32 *)buf = cpu_to_le32p(mem);
			buf += sizeof(uint32_t);
			mem += sizeof(uint32_t);
			cnt -= sizeof(uint32_t);
		}
		if (cnt)
			memcpy(buf, mem, cnt);
		memcpy(buf, mem, size);
	}
	*len += size;
}