From: H Hartley Sweeten Date: Tue, 26 Nov 2013 23:41:32 +0000 (-0700) Subject: staging: comedi: pcmmio.c: remove kcalloc() failure message X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=15d2006970edfc580e1508f96bbbf788ffb991e4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: comedi: pcmmio.c: remove kcalloc() failure message An allocation failure will have already displayed a message. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 063496d6c00e..ec098d883eb7 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -991,11 +991,8 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) devpriv->sprivs = kcalloc(n_subdevs, sizeof(struct pcmmio_subdev_private), GFP_KERNEL); - if (!devpriv->sprivs) { - printk(KERN_ERR "comedi%d: cannot allocate subdevice private data structures\n", - dev->minor); + if (!devpriv->sprivs) return -ENOMEM; - } ret = comedi_alloc_subdevices(dev, n_subdevs); if (ret)