]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd()
authorWentao Liang <vulab@iscas.ac.cn>
Tue, 22 Apr 2025 04:14:16 +0000 (12:14 +0800)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Tue, 29 Apr 2025 09:05:35 +0000 (11:05 +0200)
commit00b102d9e3827fabad366e464512a34f97406389
tree41ba0806ac91a43bd76c0b936f268fcec1bfc85a
parent529cbc9c648904e9bf07f3485a34d6e1cd3091a7
mtd: bcm47xxnflash: Add error handling for bcm47xxnflash_ops_bcm4706_ctl_cmd()

The function bcm47xxnflash_ops_bcm4706_cmd_ctrl() calls the function
bcm47xxnflash_ops_bcm4706_ctl_cmd(), but does not check its return value.
A proper implementation can be found in bcm47xxnflash_ops_bcm4706_write().

Add error log to the bcm47xxnflash_ops_bcm4706_ctl_cmd() via pr_err()
to prevent silent failure. The error Log funciton 'dev_err' is unsuitable
in this situation for it is hard to get device pointer.

Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c