2013-01-22 05:04:18

by Bing Zhao

[permalink] [raw]
Subject: [PATCH 3.8] mwifiex: fix typo in PCIe adapter NULL check

From: Avinash Patil <[email protected]>

Add missing "!" as we are supposed to check "!card->adapter"
in PCIe suspend handler.

Cc: "3.2+" <[email protected]>
Signed-off-by: Avinash Patil <[email protected]>
Signed-off-by: Bing Zhao <[email protected]>
---
drivers/net/wireless/mwifiex/pcie.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 3da89b4..237949c 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -164,7 +164,7 @@ static int mwifiex_pcie_suspend(struct pci_dev *pdev, pm_message_t state)

if (pdev) {
card = (struct pcie_service_card *) pci_get_drvdata(pdev);
- if (!card || card->adapter) {
+ if (!card || !card->adapter) {
pr_err("Card or adapter structure is not valid\n");
return 0;
}
--
1.7.0.2



2013-01-22 10:06:49

by Sergey V.

[permalink] [raw]
Subject: Re: [PATCH 3.8] mwifiex: fix typo in PCIe adapter NULL check

On 2013-01-21 at 21:04:10, Bing Zhao <[email protected]> wrote:
> From: Avinash Patil <[email protected]>
>
> Add missing "!" as we are supposed to check "!card->adapter"
> in PCIe suspend handler.
>
> Cc: "3.2+" <[email protected]>
> Signed-off-by: Avinash Patil <[email protected]>
> Signed-off-by: Bing Zhao <[email protected]>
> ---
> drivers/net/wireless/mwifiex/pcie.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/mwifiex/pcie.c
> b/drivers/net/wireless/mwifiex/pcie.c index 3da89b4..237949c 100644
> --- a/drivers/net/wireless/mwifiex/pcie.c
> +++ b/drivers/net/wireless/mwifiex/pcie.c
> @@ -164,7 +164,7 @@ static int mwifiex_pcie_suspend(struct pci_dev
> *pdev, pm_message_t state)
>
> if (pdev) {
> card = (struct pcie_service_card *)
pci_get_drvdata(pdev);
> - if (!card || card->adapter) {
> + if (!card || !card->adapter) {
> pr_err("Card or adapter structure is not
valid\n");
> return 0;
> }

Looks correct for me.

Reviewed-by: Sergey V. <[email protected]>

Thanks.


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part.