[Skiboot] [PATCH] PLAT: Use NULL check instead assertion
Ananth N Mavinakayanahalli
ananth at in.ibm.com
Tue Jan 20 21:22:32 AEDT 2015
On Tue, Jan 20, 2015 at 12:27:37PM +0530, Ananth N Mavinakayanahalli wrote:
> On Tue, Jan 20, 2015 at 10:01:28AM +0530, Neelesh Gupta wrote:
...
> Should we fall through even if we find a chip?
>
> > + } else {
> > + prlog(PR_INFO, "PLAT: Chip not found for the id 0x10\n");
> > + }
> >
> > - dev = dt_create_i2c_device(bus, 0x3a, "power-control",
> > - "maxim,5961", "pcie-hotplug");
> > - assert(dev);
> > - dt_add_property_strings(dev, "target-list", "slot-C2", "slot-C3");
> > /* Fall through */
> > case LX_VPD_1S4U_BACKPLANE:
> > case LX_VPD_1S2U_BACKPLANE:
> > /* i2c nodes on chip 0 */
> > c = get_chip(0);
> > - assert(c);
> > + if (!c) {
> > + prlog(PR_INFO, "PLAT: Chip not found for the id 0x0\n");
>
> Should we continue if we don't find a chip on either of the chips?
I wasn't sure of the I2C master topology and it being on the chip..
ignore my comments...
Ananth
More information about the Skiboot
mailing list