All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] parport: ax88796: Delete an error message for a failed memory allocation in parport_ax88796_probe()
@ 2018-02-07 19:47 Sudip Mukherjee
  2018-02-07 19:47 ` [PATCH 02/12] parport: ax88796: Improve a size determination " Sudip Mukherjee
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Sudip Mukherjee @ 2018-02-07 19:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Sudip Mukherjee

From: Markus Elfring <elfring@users.sourceforge.net>

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
---
 drivers/parport/parport_ax88796.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/parport/parport_ax88796.c b/drivers/parport/parport_ax88796.c
index 2fc91ed..ef0aec4 100644
--- a/drivers/parport/parport_ax88796.c
+++ b/drivers/parport/parport_ax88796.c
@@ -281,10 +281,8 @@ static int parport_ax88796_probe(struct platform_device *pdev)
 	int ret;
 
 	dd = kzalloc(sizeof(struct ax_drvdata), GFP_KERNEL);
-	if (dd == NULL) {
-		dev_err(_dev, "no memory for private data\n");
+	if (!dd)
 		return -ENOMEM;
-	}
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (res == NULL) {
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-03-12 14:10 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-07 19:47 [PATCH 01/12] parport: ax88796: Delete an error message for a failed memory allocation in parport_ax88796_probe() Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 02/12] parport: ax88796: Improve a size determination " Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 03/12] parport: ax88796: Delete an unnecessary variable initialisation " Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 04/12] parport: Add support for BrainBoxes PX272/PX306 MIO card Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 05/12] parport: PCI core handles power state for us Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 06/12] parport: Convert to use managed functions pcim_* and devm_* Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 07/12] parport: Don't shadow error codes in ->probe() Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 08/12] parport: Convert printk(KERN_WARN) to dev_warn() Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 09/12] parport: Switch to use module_pci_driver() macro Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 10/12] parport: Sort headers alphabetically Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 11/12] parport: Replace short License header by SPDX identifier Sudip Mukherjee
2018-02-07 19:47 ` [PATCH 12/12] parport_pc: Add support for WCH CH382L PCI-E single parallel port card Sudip Mukherjee
2018-03-01 10:46 ` [PATCH 01/12] parport: ax88796: Delete an error message for a failed memory allocation in parport_ax88796_probe() Andy Shevchenko
2018-03-01 12:06   ` Greg Kroah-Hartman
2018-03-01 12:17     ` Andy Shevchenko
2018-03-03 21:00     ` Sudip Mukherjee
2018-03-12 14:10       ` Andy Shevchenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.