Re: [PATCH 03/20] ARM: pxa: ssp: add shortcut for &pdev->dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 2013-08-08 at 00:32 -0700, Brian Norris wrote:
> On Wed, Aug 07, 2013 at 05:33:52PM +0200, Daniel Mack wrote:
> > No functional change, just a cosmetic cleanup.
> > 
> > Signed-off-by: Daniel Mack <zonque@xxxxxxxxx>
> > ---
> > --- a/arch/arm/plat-pxa/ssp.c
> > +++ b/arch/arm/plat-pxa/ssp.c
> > @@ -77,16 +77,17 @@ static int pxa_ssp_probe(struct platform_device *pdev)
> >  	const struct platform_device_id *id = platform_get_device_id(pdev);
> >  	struct resource *res;
> >  	struct ssp_device *ssp;
> > +	struct device *dev = &pdev->dev;
> >  	int ret = 0;
> >  
> >  	ssp = kzalloc(sizeof(struct ssp_device), GFP_KERNEL);
> >  	if (ssp == NULL) {
> > -		dev_err(&pdev->dev, "failed to allocate memory");
> > +		dev_err(dev, "failed to allocate memory");
> 
> Two options here: either remove the message entirely (I believe kzalloc
> will complain loudly if the allocation fails) or at least add a newline
> at the end of it!

I think only to former is the right option.

-- 
Best Regards,
Artem Bityutskiy

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux