drivers: modem: fix sending with zero timeout and no semaphore
There was a regression introduced when reordering function parameters
check. It is valid to pass NULL semaphore with zero timeout, so fix
parameter check to respect that.
Fixes: 67976f8686
("drivers: modem: verify send semaphore before
taking any action")
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
This commit is contained in:
parent
748e7b6d75
commit
5cbf2ec1f7
1 changed files with 1 additions and 1 deletions
|
@ -477,7 +477,7 @@ static int _modem_cmd_send(struct modem_iface *iface,
|
|||
struct modem_cmd_handler_data *data;
|
||||
int ret;
|
||||
|
||||
if (!iface || !handler || !handler->cmd_handler_data || !buf || !sem) {
|
||||
if (!iface || !handler || !handler->cmd_handler_data || !buf) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue