Re: [PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-24 Thread Subhash Jadavani
On 2018-04-23 17:20, Bjorn Andersson wrote: Failing to register with devfreq leaves hba->devfreq assigned, which causes the error path to dereference the ERR_PTR(). Rather than bolting on more conditionals, move the call of devm_devfreq_add_device() into it's own function and only update

Re: [PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-24 Thread Subhash Jadavani
On 2018-04-23 17:20, Bjorn Andersson wrote: Failing to register with devfreq leaves hba->devfreq assigned, which causes the error path to dereference the ERR_PTR(). Rather than bolting on more conditionals, move the call of devm_devfreq_add_device() into it's own function and only update

[PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-23 Thread Bjorn Andersson
Failing to register with devfreq leaves hba->devfreq assigned, which causes the error path to dereference the ERR_PTR(). Rather than bolting on more conditionals, move the call of devm_devfreq_add_device() into it's own function and only update hba->devfreq once it's successfully registered. The

[PATCH 2/3] scsi: ufs: Extract devfreq registration

2018-04-23 Thread Bjorn Andersson
Failing to register with devfreq leaves hba->devfreq assigned, which causes the error path to dereference the ERR_PTR(). Rather than bolting on more conditionals, move the call of devm_devfreq_add_device() into it's own function and only update hba->devfreq once it's successfully registered. The