On Mon, 20 Feb 2012 10:27:02 -0800, Guenter Roeck <guenter.roeck@xxxxxxxxxxxx> wrote: > > I check the platform_device_register_simple() returned value > > because it is the platform itself, while the others are on-board > > devices. I thought that it is not a big deal if their registrations > > failed but the platform registration succeeded. Maybe I'm wrong and > > I should check everything. > > > Hmm .. seems to make sense. Ok with me. Only question is if you would > want to have it fail silently or issue a log message (possibly debug) > to report the failure. Ok, I'll go for something like the following: if (led_classdev_register(&pdev->dev, &ts5500_led_cdev)) dev_warn(ts5500_led_cdev.dev, "failed to register the LED\n"); if (ts5500->adc) { ts5500_adc_pdev.dev.parent = &pdev->dev; if (platform_device_register(&ts5500_adc_pdev)) dev_warn(&ts5500_adc_pdev.dev, "failed to register the A/D converter\n"); } Thanks, -- Vivien Didelot Savoir-faire Linux Inc. Tel: (514) 276-5468 #149 _______________________________________________ lm-sensors mailing list lm-sensors@xxxxxxxxxxxxxx http://lists.lm-sensors.org/mailman/listinfo/lm-sensors