@@ -549,7 +549,6 @@ static int picolcd_probe(struct hid_device *hdev,
*/
data = kzalloc(sizeof(struct picolcd_data), GFP_KERNEL);
if (data == NULL) {
- hid_err(hdev, "can't allocate space for Minibox PicoLCD device data\n");
error = -ENOMEM;
goto err_no_cleanup;
}
@@ -548,10 +548,9 @@ int picolcd_init_framebuffer(struct picolcd_data *data)
fbdata->force = 1;
fbdata->vbitmap = info->par + sizeof(struct picolcd_fb_data);
fbdata->bitmap = vmalloc(PICOLCDFB_SIZE*8);
- if (fbdata->bitmap == NULL) {
- dev_err(dev, "can't get a free page for framebuffer\n");
+ if (!fbdata->bitmap)
goto err_nomem;
- }
+
info->screen_base = (char __force __iomem *)fbdata->bitmap;
info->fix.smem_start = (unsigned long)fbdata->bitmap;
memset(fbdata->vbitmap, 0xff, PICOLCDFB_SIZE);
@@ -122,7 +122,6 @@ int picolcd_init_leds(struct picolcd_data *data, struct hid_report *report)
for (i = 0; i < 8; i++) {
led = kzalloc(sizeof(struct led_classdev)+name_sz, GFP_KERNEL);
if (!led) {
- dev_err(dev, "can't allocate memory for LED %d\n", i);
ret = -ENOMEM;
goto err;
}