Re: [patch] pda_power: remove unneeded assignment

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

 



On Mon, Aug 23, 2010 at 11:21:03PM +0200, Dan Carpenter wrote:
> We never use the "ret" value from this assignment, and also
> PTR_ERR(NULL) is zero.  I looked at it and this driver is designed to
> accept a NULL value for "ac_draw".  So there isn't a bug in the original
> code and we can just remove this confusing assignment.
> 
> Signed-off-by: Dan Carpenter <error27@xxxxxxxxx>

Looks reasonable.

Acked-by: Daniel Mack <daniel@xxxxxxxx>

> diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
> index 69f8aa3..63a6a4d 100644
> --- a/drivers/power/pda_power.c
> +++ b/drivers/power/pda_power.c
> @@ -279,7 +279,6 @@ static int pda_power_probe(struct platform_device *pdev)
>  	if (IS_ERR(ac_draw)) {
>  		dev_dbg(dev, "couldn't get ac_draw regulator\n");
>  		ac_draw = NULL;
> -		ret = PTR_ERR(ac_draw);
>  	}
>  
>  	if (pdata->is_ac_online) {
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux