On 01/04/2019 06:14, Andrey Smirnov wrote: > This driver is meant to be used with Device Tree and there's no > use-case where device's DT node is going to be NULL. Remove code > protecting against that.
May be elaborate why is never going to be NULL? > Signed-off-by: Andrey Smirnov <andrew.smir...@gmail.com> > Cc: Chris Healy <cphe...@gmail.com> > Cc: Lucas Stach <l.st...@pengutronix.de> > Cc: Zhang Rui <rui.zh...@intel.com> > Cc: Eduardo Valentin <edubez...@gmail.com> > Cc: Daniel Lezcano <daniel.lezc...@linaro.org> > Cc: Angus Ainslie (Purism) <an...@akkea.ca> > Cc: linux-...@nxp.com > Cc: linux...@vger.kernel.org > Cc: linux-kernel@vger.kernel.org Acked-by: Daniel Lezcano <daniel.lezc...@linaro.org> > --- > drivers/thermal/qoriq_thermal.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/drivers/thermal/qoriq_thermal.c b/drivers/thermal/qoriq_thermal.c > index 3b5f5b3fb1bc..7b364933bfb1 100644 > --- a/drivers/thermal/qoriq_thermal.c > +++ b/drivers/thermal/qoriq_thermal.c > @@ -193,11 +193,6 @@ static int qoriq_tmu_probe(struct platform_device *pdev) > struct qoriq_tmu_data *data; > struct device_node *np = pdev->dev.of_node; > > - if (!np) { > - dev_err(&pdev->dev, "Device OF-Node is NULL"); > - return -ENODEV; > - } > - > data = devm_kzalloc(&pdev->dev, sizeof(struct qoriq_tmu_data), > GFP_KERNEL); > if (!data) > -- <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog