Commit 81439410 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Greg Kroah-Hartman

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: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 428ed14f
...@@ -352,12 +352,8 @@ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state) ...@@ -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_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
struct rtsx_chip *chip; struct rtsx_chip *chip;
dev_info(&dev->pci->dev, "Ready to suspend\n"); if (!dev)
if (!dev) {
dev_err(&dev->pci->dev, "Invalid memory\n");
return 0; return 0;
}
/* lock the device pointers */ /* lock the device pointers */
mutex_lock(&(dev->dev_mutex)); mutex_lock(&(dev->dev_mutex));
...@@ -391,12 +387,8 @@ static int rtsx_resume(struct pci_dev *pci) ...@@ -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_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
struct rtsx_chip *chip; struct rtsx_chip *chip;
dev_info(&dev->pci->dev, "Ready to resume\n"); if (!dev)
if (!dev) {
dev_err(&dev->pci->dev, "Invalid memory\n");
return 0; return 0;
}
chip = dev->chip; chip = dev->chip;
...@@ -441,12 +433,8 @@ static void rtsx_shutdown(struct pci_dev *pci) ...@@ -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_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci);
struct rtsx_chip *chip; struct rtsx_chip *chip;
dev_info(&dev->pci->dev, "Ready to shutdown\n"); if (!dev)
if (!dev) {
dev_err(&dev->pci->dev, "Invalid memory\n");
return; return;
}
chip = dev->chip; chip = dev->chip;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment