On Thu, May 28, 2015 at 04:32:30PM +0300, Dan Carpenter wrote: > On Thu, May 28, 2015 at 01:23:57PM +0000, Gujulan Elango, Hari Prasath (H.) wrote: > > Check the return value of kzalloc & return error if it fails. > > > > Signed-off-by: Gujulan Elango Hari Prasath <hgujulan@xxxxxxxxxxx> > > --- > > drivers/staging/dgnc/dgnc_driver.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c > > index 935e297..2c729be 100644 > > --- a/drivers/staging/dgnc/dgnc_driver.c > > +++ b/drivers/staging/dgnc/dgnc_driver.c > > @@ -589,6 +589,8 @@ static int dgnc_found_board(struct pci_dev *pdev, int id) > > * context, and there are no locks held. > > */ > > brd->flipbuf = kzalloc(MYFLIPLEN, GFP_KERNEL); > > + if (!brd->flipbuf) > > + return -ENOMEM; > > Just delete flipbuf and all the references to it. > > regards, > dan carpenter > ok I checked it out before.flipbuf is not used anywhere in this driver.I will go ahead and delete all references to it and send out a new patch.Let us discard this patch as it makes no sense. regards Hari Prasath _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel