cxgb3: avoid needless buffer copy for firmware
authorKees Cook <keescook@chromium.org>
Tue, 16 Jun 2015 22:36:17 +0000 (15:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sun, 21 Jun 2015 16:49:55 +0000 (09:49 -0700)
commit92a486ca3a45777bdec0b9fd225a8eeec82bddb7
treefaa0170f61e6fee89a14e994c694b7cceeabd70c
parenta55e1c5c2640549ff3beb843f7ecaa242d69c351
cxgb3: avoid needless buffer copy for firmware

There's no reason to perform a buffer copy for the firmware name. This
also avoids a (currently impossible with current callers) NULL dereference
if there was no matching firmware.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c