> On Jun 13, 2016, at 7:26 PM, weiyj_lk@xxxxxxx wrote: > > From: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> > > In case of error, the function devm_kzalloc() returns NULL pointer > not ERR_PTR(). The IS_ERR() test in the return value check should > be replaced with NULL test. > > Signed-off-by: Wei Yongjun <yongjun_wei@xxxxxxxxxxxxxxxxx> > --- > drivers/ata/ahci_seattle.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ata/ahci_seattle.c b/drivers/ata/ahci_seattle.c > index 6e702ab..1d31c0c 100644 > --- a/drivers/ata/ahci_seattle.c > +++ b/drivers/ata/ahci_seattle.c > @@ -137,7 +137,7 @@ static const struct ata_port_info *ahci_seattle_get_port_info( > u32 val; > > plat_data = devm_kzalloc(dev, sizeof(*plat_data), GFP_KERNEL); > - if (IS_ERR(plat_data)) > + if (!plat_data) > return &ahci_port_info; > > plat_data->sgpio_ctrl = devm_ioremap_resource(dev, > > Acked-by: Brijesh Singh <brijesh.singh@xxxxxxx> -Brijesh -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html