Re: [PATCH 1/1]mtd:nand_mxs:update get/set features legacy function call

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

 



On Thu, Jan 07, 2021 at 10:19:38AM +0800, jameszxj wrote:
> update get/set features legacy function call to avoid NULL pointer crash.
> 
> Signed-off-by: zhengxiaojun <jameszxj at gmail.com>
> --- 
>  drivers/mtd/nand/nand_mxs.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

The format is perfectly fine, thanks :)

Applied.

Sascha

> 
> diff --git a/drivers/mtd/nand/nand_mxs.c b/drivers/mtd/nand/nand_mxs.c
> index 9f7ab1442..ad8aeb41f 100644
> --- a/drivers/mtd/nand/nand_mxs.c
> +++ b/drivers/mtd/nand/nand_mxs.c
> @@ -2055,14 +2055,12 @@ static int mxs_nand_enable_edo_mode(struct mxs_nand_info *info)
>  		/* [1] send SET FEATURE commond to NAND */
>  		feature[0] = mode;
>  
> -		ret = chip->legacy.set_features(chip,
> -				ONFI_FEATURE_ADDR_TIMING_MODE, feature);
> +		ret = nand_set_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, feature);
>  		if (ret)
>  			goto err_out;
>  
>  		/* [2] send GET FEATURE command to double-check the timing mode */
> -		ret = chip->legacy.get_features(chip,
> -				ONFI_FEATURE_ADDR_TIMING_MODE, feature);
> +		ret = nand_get_features(chip, ONFI_FEATURE_ADDR_TIMING_MODE, feature);
>  		if (ret || feature[0] != mode)
>  			goto err_out;
>  	}
> -- 
> 2.29.2
> _______________________________________________
> barebox mailing list
> barebox@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux