mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
orinoco: avoid assertion in case of NULL pointer
[ Upstream commit c705f9fc6a1736dcf6ec01f8206707c108dca824 ] In ezusb_init, if upriv is NULL, the code crashes. However, the caller in ezusb_probe can handle the error and print the failure message. The patch replaces the BUG_ON call to error return. Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
5a14db967b
commit
75423fdad2
1 changed files with 2 additions and 1 deletions
|
|
@ -1361,7 +1361,8 @@ static int ezusb_init(struct hermes *hw)
|
|||
int retval;
|
||||
|
||||
BUG_ON(in_interrupt());
|
||||
BUG_ON(!upriv);
|
||||
if (!upriv)
|
||||
return -EINVAL;
|
||||
|
||||
upriv->reply_count = 0;
|
||||
/* Write the MAGIC number on the simulated registers to keep
|
||||
|
|
|
|||
Loading…
Reference in a new issue