Remove unnecessary check aginst NULL. txp_ext_command() with

TXP_CMD_WAIT argument allocates a response buffer.  If the allocation
fails, txp_ext_command() returns an error and it's handed in caller.

Found by:	PVS-Studio
This commit is contained in:
Pyun YongHyeon 2017-04-14 03:23:03 +00:00
parent a860c16ab7
commit 8d16945419
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316808

View File

@ -400,8 +400,7 @@ txp_attach(device_t dev)
"Unknown Typhoon sleep image version: %u:0x%08x\n",
rsp->rsp_numdesc, p2);
}
if (rsp != NULL)
free(rsp, M_DEVBUF);
free(rsp, M_DEVBUF);
sc->sc_xcvr = TXP_XCVR_AUTO;
txp_command(sc, TXP_CMD_XCVR_SELECT, TXP_XCVR_AUTO, 0, 0,