lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Thu, 20 Sep 2012 20:58:20 +0900
From:	YAMANE Toshiaki <yamanetoshi@...il.com>
To:	Greg Kroah-Hartman <greg@...ah.com>
Cc:	Fengguang Wu <fengguang.wu@...el.com>, devel@...verdev.osuosl.org,
	Dan Carpenter <dan.carpenter@...cle.com>,
	linux-kernel@...r.kernel.org,
	YAMANE Toshiaki <yamanetoshi@...il.com>
Subject: [PATCH] staging/rts_pstor: Delete some lines (dev_info() and dev_err()) in rtsx.c

fixed some coccinelle warnings.
+ drivers/staging/rts_pstor/rtsx.c:397:16-19: ERROR: dev is NULL but dereferenced.
  drivers/staging/rts_pstor/rtsx.c:447:16-19: ERROR: dev is NULL but dereferenced.
  drivers/staging/rts_pstor/rtsx.c:358:16-19: ERROR: dev is NULL but dereferenced.

Signed-off-by: YAMANE Toshiaki <yamanetoshi@...il.com>
---
 drivers/staging/rts_pstor/rtsx.c |   18 +++---------------
 1 file changed, 3 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/rts_pstor/rtsx.c b/drivers/staging/rts_pstor/rtsx.c
index 213829e..afe9c2e 100644
--- a/drivers/staging/rts_pstor/rtsx.c
+++ b/drivers/staging/rts_pstor/rtsx.c
@@ -352,12 +352,8 @@ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state)
 	struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
 	struct rtsx_chip *chip;
 
-	dev_info(&dev->pci->dev, "Ready to suspend\n");
-
-	if (!dev) {
-		dev_err(&dev->pci->dev, "Invalid memory\n");
+	if (!dev)
 		return 0;
-	}
 
 	/* lock the device pointers */
 	mutex_lock(&(dev->dev_mutex));
@@ -391,12 +387,8 @@ static int rtsx_resume(struct pci_dev *pci)
 	struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
 	struct rtsx_chip *chip;
 
-	dev_info(&dev->pci->dev, "Ready to resume\n");
-
-	if (!dev) {
-		dev_err(&dev->pci->dev, "Invalid memory\n");
+	if (!dev)
 		return 0;
-	}
 
 	chip = dev->chip;
 
@@ -441,12 +433,8 @@ static void rtsx_shutdown(struct pci_dev *pci)
 	struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
 	struct rtsx_chip *chip;
 
-	dev_info(&dev->pci->dev, "Ready to shutdown\n");
-
-	if (!dev) {
-		dev_err(&dev->pci->dev, "Invalid memory\n");
+	if (!dev)
 		return;
-	}
 
 	chip = dev->chip;
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ