staging: Remove unnecessary OOM messages
[pandora-kernel.git] / drivers / staging / comedi / drivers / usbdux.c
index 7c2f856..1a0062a 100644 (file)
@@ -2445,8 +2445,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
        /* create space for the commands of the DA converter */
        usbduxsub[index].dac_commands = kzalloc(NUMOUTCHANNELS, GFP_KERNEL);
        if (!usbduxsub[index].dac_commands) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "error alloc space for dac commands\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2454,8 +2452,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
        /* create space for the commands going to the usb device */
        usbduxsub[index].dux_commands = kzalloc(SIZEOFDUXBUFFER, GFP_KERNEL);
        if (!usbduxsub[index].dux_commands) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "error alloc space for dux commands\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2463,8 +2459,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
        /* create space for the in buffer and set it to zero */
        usbduxsub[index].inBuffer = kzalloc(SIZEINBUF, GFP_KERNEL);
        if (!(usbduxsub[index].inBuffer)) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "could not alloc space for inBuffer\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2472,8 +2466,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
        /* create space of the instruction buffer */
        usbduxsub[index].insnBuffer = kzalloc(SIZEINSNBUF, GFP_KERNEL);
        if (!(usbduxsub[index].insnBuffer)) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "could not alloc space for insnBuffer\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2481,8 +2473,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
        /* create space for the outbuffer */
        usbduxsub[index].outBuffer = kzalloc(SIZEOUTBUF, GFP_KERNEL);
        if (!(usbduxsub[index].outBuffer)) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "could not alloc space for outBuffer\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2504,10 +2494,9 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
                usbduxsub[index].numOfInBuffers = NUMOFINBUFFERSFULL;
 
        usbduxsub[index].urbIn =
-           kzalloc(sizeof(struct urb *) * usbduxsub[index].numOfInBuffers,
-                   GFP_KERNEL);
+               kcalloc(usbduxsub[index].numOfInBuffers, sizeof(struct urb *),
+                       GFP_KERNEL);
        if (!(usbduxsub[index].urbIn)) {
-               dev_err(dev, "comedi_: usbdux: Could not alloc. urbIn array\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2532,8 +2521,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
                usbduxsub[index].urbIn[i]->transfer_buffer =
                    kzalloc(SIZEINBUF, GFP_KERNEL);
                if (!(usbduxsub[index].urbIn[i]->transfer_buffer)) {
-                       dev_err(dev, "comedi_: usbdux%d: "
-                               "could not alloc. transb.\n", index);
                        tidy_up(&(usbduxsub[index]));
                        up(&start_stop_sem);
                        return -ENOMEM;
@@ -2552,11 +2539,9 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
                usbduxsub[index].numOfOutBuffers = NUMOFOUTBUFFERSFULL;
 
        usbduxsub[index].urbOut =
-           kzalloc(sizeof(struct urb *) * usbduxsub[index].numOfOutBuffers,
-                   GFP_KERNEL);
+               kcalloc(usbduxsub[index].numOfOutBuffers, sizeof(struct urb *),
+                       GFP_KERNEL);
        if (!(usbduxsub[index].urbOut)) {
-               dev_err(dev, "comedi_: usbdux: "
-                       "Could not alloc. urbOut array\n");
                tidy_up(&(usbduxsub[index]));
                up(&start_stop_sem);
                return -ENOMEM;
@@ -2581,8 +2566,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
                usbduxsub[index].urbOut[i]->transfer_buffer =
                    kzalloc(SIZEOUTBUF, GFP_KERNEL);
                if (!(usbduxsub[index].urbOut[i]->transfer_buffer)) {
-                       dev_err(dev, "comedi_: usbdux%d: "
-                               "could not alloc. transb.\n", index);
                        tidy_up(&(usbduxsub[index]));
                        up(&start_stop_sem);
                        return -ENOMEM;
@@ -2617,8 +2600,6 @@ static int usbdux_usb_probe(struct usb_interface *uinterf,
                usbduxsub[index].urbPwm->transfer_buffer =
                    kzalloc(usbduxsub[index].sizePwmBuf, GFP_KERNEL);
                if (!(usbduxsub[index].urbPwm->transfer_buffer)) {
-                       dev_err(dev, "comedi_: usbdux%d: "
-                               "could not alloc. transb. for pwm\n", index);
                        tidy_up(&(usbduxsub[index]));
                        up(&start_stop_sem);
                        return -ENOMEM;