staging: rtl8188eu: always free cmd_obj in the cmd thread
authorMartin Kaiser <martin@kaiser.cx>
Thu, 8 Apr 2021 19:55:58 +0000 (21:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Apr 2021 14:17:23 +0000 (16:17 +0200)
commitddc7e53e5eca4fa237ce3b1cc0a5f67674a1cdad
tree77c38925dd649b08e1c251dae80b539339ab7fcd
parente2794029df299754b5d7662f8e57a6c9ba423f1f
staging: rtl8188eu: always free cmd_obj in the cmd thread

The rtl8188 driver starts a command thread that reads commands from a queue
and processes them. Each command consists of a struct cmd_obj. The command
thread may call a function to process the current command and optionally a
post-processing function. Eventually, the command's cmd_obj must be freed.

At the moment, if there's a post-processing function for the current
command, this function has to free the cmd_obj. If there's no
post-processing function, the command thread frees cmd_obj.

It's much simpler if we always leave it to the command thread to free
cmd_obj.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20210408195601.4762-9-martin@kaiser.cx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_cmd.c